Webpack inside set NODE_ENV=production.

  node.js, question

The system is windows and wants to package react production environment code with webpack. The package.json partial code is as follows:

"scripts": {
    "start": "node server.js",
    "build": "set NODE_ENV=production && webpack -p --progress --profile --colors"
  },

Command line typingnpm run buildAfter refreshing the webpage, why is there still warning in console inside?

To solve this problem, we must add the following words to plugins inside:

new webpack.DefinePlugin({
 'process.env': {
 'NODE_ENV': '"production"'
 bracket
 })

Is the correct posture