Babel compilation ES6 property error

class MyClass {
  myProp = 42;
}

the above code will report to Unexpected token when Babel compiles

{
  "presets": [
    "env",
    "react"
  ],
  "plugins": [
    "react-hot-loader/babel"
  ]
}

this is the configuration file of Babel
also ask friends who know

Mar.22,2021

inadvertently found the answer. This is the property initializer syntax. Babel needs to be configured before it can be used. For more information, please see @ babel/plugin-proposal-class-properties

.
Menu