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

add support for BigInt literal #2561

Closed
LongTengDao opened this issue Nov 17, 2018 · 4 comments
Closed

add support for BigInt literal #2561

LongTengDao opened this issue Nov 17, 2018 · 4 comments

Comments

@LongTengDao
Copy link
Contributor

Feature Use Case

const bigint = 0n;

Feature Proposal

Don't throw Error: Identifier directly after number.

@LongTengDao
Copy link
Contributor Author

@lukastaegert Hi~ Is this problem in process?

@lukastaegert
Copy link
Member

As this is not an official language feature, you need the appropriate acorn plugin: https://github.com/acornjs/acorn-bigint

Does this work for you in Rollup@1.0?

@LongTengDao
Copy link
Contributor Author

LongTengDao commented Dec 30, 2018

@lukastaegert

Really thanks and sorry, I didn't know BigInt is not standard yet, because Chrome and Nodejs had supported it. I tried in Firefox and Edge, indeed it's only supported by v8 privately.

And your suggest works (rollup({ acornInjectPlugins: [ require('acorn-bigint') ] })), thanks!

There is a bug with ** operator. Never mind. I opened an issue there.

@LongTengDao
Copy link
Contributor Author

Oh, the problem may be in rollup. I opened a new issue #2626 @lukastaegert

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