-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: build kits with cjs and esm targets #1049
base: development
Are you sure you want to change the base?
Conversation
chore: update build for the whole repo
Pull Request Test Coverage Report for Build 12826671185Details
💛 - Coveralls |
Hey folks! I wanted to give this a little bump because I'm working on the next thing, and once again, I'm seeing your code in a stack trace related to the whole CJS/ESM interop stuff. As always, If there is anything I can do to help push this forward, just let me know. |
We’ve made significant progress and, after running multiple tests, it seems to be working well overall. However, there’s one issue related to CommonJS compatibility that we’re still trying to address. Specifically, due to the way the Safe class from the protocol-kit is exported, users currently need to use .default when importing it in CommonJS: const Safe = require('@safe-global/protocol-kit').default // TODO: remove .default
Safe.init({ key: 'value' }) We’d love to eliminate the need for Thanks for your time and support. |
Hey @DaniSomoza Thanks for getting back to me. This probably won't be the answer you're looking for, but I need to ask anyway :) Would eliminating the Then, instead of: const Safe = require('@safe-global/protocol-kit').default People would need to do: const { Safe } = require('@safe-global/protocol-kit') This would mean a breaking API change, but it may also be worth considering. |
What it solves
Continues #1047
How this PR fixes it