//webpack :
if(env.production) {
plugins.push(
new MiniCssExtractPlugin({
filename: path.posix.join(__dirname, "../dist/style.css")
}),
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: ""production""
}
})
)
}
console.log("="+process.env.NODE_ENV)
Picture description
the value is assigned by DefinePlugin, and the value is displayed as undefined,. I don"t know what happened.