-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support for private field declarations? #3128
Comments
You can use the acornInjectPlugins option coupled with the acorn private class elements plugin to handle this: import acornPrivateFields from 'acorn-private-class-elements'
export default {
// … other options …
acornInjectPlugins: [
acornPrivateFields()
]
}; FWIW Private Fields are still a TC39 Stage 3 proposal and are not standardised ECMAScript (yet). |
Oh, I thought the Chromium team had a policy not to ship any unapproved JavaScript features unless they were behind a flag (--experimental-javascript). Since they shipped private class fields not behind a flag in v74 I assumed that must mean the feature had passed some threshold of "approved" otherwise it would still be behind the flag |
I believe support in a major browser is a prerequisite for a Stage 3 feature to become Stage 4. |
Closing this one as resolved. |
How Do We Reproduce?
rollup this code
repl
Expected Behavior
It rolls up
Actual Behavior
It gets a syntax error
Note: the code snippet above works in Chrome https://jsfiddle.net/greggman/z5w1pd9m/ and in node 12
The text was updated successfully, but these errors were encountered: