Skip to content
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

Missing export statement #225

Open
nicolasr75 opened this issue Jan 26, 2022 · 2 comments
Open

Missing export statement #225

nicolasr75 opened this issue Jan 26, 2022 · 2 comments

Comments

@nicolasr75
Copy link

I use BigInteger indirectly via redux in an ES6 based app that I build via rollup.
Rollup fails to build because no default export of BigInteger can be found.

To fix this I added

export default bigInt;

at the end of BigInteger.js. Am I misunderstanding something here or is this really missing to make it work with ES6 imports?

@peterolson
Copy link
Owner

BigInteger.js uses CommonJS module.exports. Does your build system not support that?

@nicolasr75
Copy link
Author

Thanks for the quick reply. It looks like there is a rollup plugin that would enable using CommonJS exports. I just thought it would be nice to support ES6 directly, especially since it's only this one line to add. Now that ES6 modules are supported by all major browsers many people will start with ES6 directly and will stumble over this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants