So this is the full error: You are currently using minified code outside of NODE_ENV === \'production\'. This means that you are running a slower development build
You need to add:
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
For your production config
Setting "mode" helped to fix the issue like below with webpack 4, either you can use value for mode :development/production for an appropriate configuration file.
module.exports = {
mode: 'development'
};