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

BigInt nodejs and ES2020/ES2018 #231

Closed
SamyPesse opened this issue Jul 6, 2020 · 2 comments
Closed

BigInt nodejs and ES2020/ES2018 #231

SamyPesse opened this issue Jul 6, 2020 · 2 comments

Comments

@SamyPesse
Copy link
Contributor

When bundling for with --platform=node --target=es2018, I'm getting the error:

error: Big integer literals are from ES2020 and transforming them to ES2018 is not supported

BigInt are supported natively in Node since version 10.4, but some ES2020 syntaxes are not supported (ex: optional chaining).

It may be interesting as a workaround to not throw this error and output native BigInt if --platform=node.

@evanw
Copy link
Owner

evanw commented Jul 8, 2020

I've been meaning to add more fine-grained syntax feature control for a while now. This is a good excuse to do it. I'm adding more options for --target so you can now say --target=node10.4 instead of --target=es2018 and have it do the right thing. This hasn't been released yet but will be released soon.

@SamyPesse
Copy link
Contributor Author

Awesome thank you 🙌 this is a great API

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

No branches or pull requests

2 participants