In Webpack, I have the following plugins:
plugins: [
new ExtractTextPlugin(\'styles.css\'),
new webpack.optimize.UglifyJsPlugin({
com
You can have one webpack config, built upon another, and add a few plugins (and/or change output names, etc) in the latter one:
This webpack.release.config.js makes use of a webpack.config (development version), but uses more plugins...
process.env.NODE_ENV = 'release';
const config = require('./webpack.config'),
webpack = require('webpack');
config.output.filename = 'app.min.js';
// use another plugin, compare to the basic version ←←←
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
minimize: true
}));
module.exports = config;
Also see here for a full example.