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:
parent
b57e6d019f
commit
adc669df06
950
dist/clipboard.js
vendored
950
dist/clipboard.js
vendored
File diff suppressed because one or more lines are too long
1
dist/clipboard.min.js
vendored
1
dist/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
@ -37,8 +37,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build-debug && npm run build-min",
|
||||
"build-debug": "webpack --mode=development",
|
||||
"build-min": "cross-env NODE_ENV=production webpack --mode=production",
|
||||
"build-debug": "webpack",
|
||||
"build-min": "cross-env NODE_ENV=production webpack",
|
||||
"build-watch": "webpack --watch",
|
||||
"test": "karma start --single-run",
|
||||
"prepublish": "npm run build"
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user