module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
presets: ["env", "react"]
}
}
}
]
},
webpack.config.js adds react to report an error in this way, but all the online methods have been tried but not solved. Webpack version 3.10, how to add react and load it with babel-loader?