Closed mmv08 closed 2 weeks ago
I looked into the original error message and discovered the problem was in the cbor
's package incompatibility with the browser environment. I fixed it by switching to a web-compatible version, and, therefore, I propose not to add an ESM build. We can postpone that to later and see if we get any requests from the users (we do not market the passkeys package as the SDK for Safe + Passkeys and have a dedicated SDK in the safe-core-sdk)
Description
Currently, we're exporting all the builds as
commonjs
and a lot of tooling is expecting es module builds nowadays, and sometimes the interop mechanism has bugs (e.g., https://github.com/safe-global/safe-modules/pull/389#discussion_r1574665647)Hardhat doesn't support ESM with TypeScript, so the only solution we can try is to add a second typescript config and use it for the build