Always run webpack in production mode. (#595)

Otherwise horribly inefficent code that evals(!) strings of code is generated.
This commit is contained in:
Rouven Weßling
2018-11-12 03:53:43 +01:00
committed by Zeno Rocha
parent b57e6d019f
commit adc669df06
4 changed files with 870 additions and 87 deletions

View File

@@ -12,6 +12,7 @@ Licensed MIT © Zeno Rocha`;
module.exports = {
entry: './src/clipboard.js',
mode: 'production',
output: {
filename: production ? 'clipboard.min.js' : 'clipboard.js',
path: path.resolve(__dirname, 'dist'),
@@ -24,6 +25,7 @@ module.exports = {
]
},
optimization: {
minimize: production,
minimizer: [
new UglifyJSPlugin({
parallel: require('os').cpus().length,