BEST PRACTICES 👉 webpack/webpack#5493 (comment)
Webpack plugin that does nothing
npm i noop-webpack-plugin -D
var webpack = require('webpack')
var noop = require('noop-webpack-plugin')
var isProd = process.env.NODE_ENV === 'production'
module.exports = {
entry: './src/entry.js',
output: {
path: './dist',
filename: '[name].js'
},
plugins: [
isProd ? new webpack.optimize.UglifyJsPlugin() : noop()
]
}
MIT