webpack warning – WARNING in DefinePlugin Conflicting values for ‘process.env.NODE_ENV’

try changing

new webpack.DefinePlugin({
      "process.env": {
        // This has effect on the react lib size
        NODE_ENV: JSON.stringify("production"),
      },
    }),

to

plugins: [
    new webpack.DefinePlugin({
        'process.env.NODE_ENV' : JSON.stringify('production')
    })
]

Leave a Comment