Hello, I have a problem with minification.. I have a project generating a js library that I use from a reactJS app, and I've noticed that jsBrowserDevelopmentWebpack and jsBrowserProductionWebpack produce the same, not minified, files.
Should I do something to activate minification in production? I tried to create the webpack.config.d folder but I have an error saying webpack is not defined at this line:
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
minimize: true
}));
EDIT: I've added
const webpack = require('webpack');
and now the error is
[webpack-cli] TypeError: webpack.optimize.UglifyJsPlugin is not a constructor