A react project, the down arrow function structure assignment can be used, does it not need @ babel/polyfill to be compatible?
the code is as follows:
package.json
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.4",
partial configuration of webpack
{
test: /(\.js)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
"cacheDirectory": true,
"presets":
[
["@babel/preset-env",{targets: { browsers: "last 2 versions" }}],
"@babel/react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
]
}
}
},