-
Notifications
You must be signed in to change notification settings - Fork 13
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
Needs a main entry in package.json #9
Comments
28 tasks
Either way, the "browser" conditional export should be CJS, just like the top-level "browser" field itself. |
achingbrain
referenced
this issue
in achingbrain/cborg
Mar 25, 2021
We can't use the `**` operator as right now it gets transpiled to `Math.pow` which only takes Numbers. Similarly, trying to avoid referencing node globals to get a `Buffer` instance causes similar problems now that bundlers don't tend to come with node polyfills any more. Swaps the use of `**` for the BigInt literal result of the calculation and uses the `Buffer` module to ensure compatibility. Fixes #7 Fixes #8 Please publish with a `main` field to also fix #9.
Fixed in #11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Browserify doesn't understand
exports
inpackage.json
. Even if it did, it'd probably take thebrowser
conditional export which would give it esm which would make it explode without extra config.This module should be published with a
main
field that provides a cjs fallback for environments that don't understandexports
or esm.The text was updated successfully, but these errors were encountered: