Skip to content

Why @babel/proposal-class-properties add plugins ? #12171

Answered by nicolo-ribaudo
astroplex asked this question in Q&A
Discussion options

You must be logged in to vote

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"
  ]
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JLHwung
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants