Why @babel/proposal-class-properties add plugins ? #12171
-
After babel-preset-env version 7.10.0 but when I not include plugin I got this error.
My .babelrc setting is
|
Beta Was this translation helpful? Give feedback.
Answered by
nicolo-ribaudo
Oct 14, 2020
Replies: 1 comment
-
Since class properties are not standard ECMAScript yet, you have to explicitly enable support for proposals that are already shipped in browsers: {
"plugins": [
"lodash"
],
"presets": [
["@babel/preset-env", { "shippedProposals": true }],
"@babel/preset-react",
"@babel/preset-typescript"
]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JLHwung
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since class properties are not standard ECMAScript yet, you have to explicitly enable support for proposals that are already shipped in browsers: