title: webpack warning - WARNING in DefinePlugin Conflicting values for 'process.env.NODE_ENV'
body: <p>I'm getting the warning in the title when I try to run development mode. This script used to work fine for an earlier website but now I always get this warning.</p>
  <p>This is my package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;frontend&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;webpack --mode development --watch&quot;,
      &quot;build&quot;: &quot;webpack --mode production&quot;
    },
    &quot;keywords&quot;: [],
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.13.10&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.13.12&quot;,
      &quot;@babel/preset-react&quot;: &quot;^7.12.13&quot;,
      &quot;babel-loader&quot;: &quot;^8.2.2&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;webpack&quot;: &quot;^5.27.2&quot;,
      &quot;webpack-cli&quot;: &quot;^4.5.0&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@babel/plugin-proposal-class-properties&quot;: &quot;^7.13.0&quot;,
      &quot;@material-ui/core&quot;: &quot;^4.11.3&quot;,
      &quot;@material-ui/icons&quot;: &quot;^4.11.2&quot;,
      &quot;react-router-dom&quot;: &quot;^5.2.0&quot;
    }
  }
  </code></pre>
  <p>And my webpack.config.js:</p>
  <pre><code>const path = require(&quot;path&quot;);
  const webpack = require(&quot;webpack&quot;);
  
  module.exports = {
    entry: &quot;./src/index.js&quot;,
    output: {
      path: path.resolve(__dirname, &quot;./static/frontend&quot;),
      filename: &quot;[name].js&quot;,
    },
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: &quot;babel-loader&quot;,
          },
        },
      ],
    },
    optimization: {
      minimize: true,
    },
    plugins: [
      new webpack.DefinePlugin({
        &quot;process.env&quot;: {
          // This has effect on the react lib size
          NODE_ENV: JSON.stringify(&quot;production&quot;),
        },
      }),
    ],
  };
  </code></pre>
  <p>I've searched around everywhere but couldn't find anything similar to this warning.</p>