-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add ESM/CJS import tests #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the visibility into this.
My main exposure to the CJS vs ESM problem is one where I clone a codebase that does nearly what I want (e.g. a snarkjs app or tiny-noir-js demo website) and revise commands to show how you can easily export proof requests via our SDK. Honestly I'm pretty lost on the finer comparison between the two, but I appreciate that we are making it a priority to support both.
This adds some basic tests to make sure that the ESM and CJS builds are working. It's easy to accidentally add a library that doesn't work with one of the builds, or to do something that pushes the library under a
default
property on the CJS build. I've added and reverted a few commits here that demonstrate these issues and the tests catching them.In particular, see these commits which introduce different errors:
.default
Closes #63