mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Always run webpack in production mode. (#595)
Otherwise horribly inefficent code that evals(!) strings of code is generated.
This commit is contained in:
committed by
Zeno Rocha
parent
b57e6d019f
commit
adc669df06
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user