We are already running replace-imports.sh from build:libs that is run
before publishing to NPM so callingit when "prepublish" is a redundancy,
besides prepublish.js was only building for cjs and now we are going to
have cjs and esm.
Add cases where babel plugins were not handling properly adding js
extension for ESM and where some packages imports were not modified at
all because they were imported dynamically.
The current implementation of replace-impots.sh that was modified
previously to the current stable connect version was not updating
imports in .d.ts files that was causing to have in connect in npm
imports like:
import { Capability } from '@trezor/protobuf/src/messages';
But the released `@trezor/protobuf` package does not publish `src/` but
only `lib/` so it has to be handle also when publishing.