Compress better
This commit is contained in:
parent
ab928e8669
commit
e4b283b83e
|
@ -1,4 +1,6 @@
|
|||
const join = require('path').resolve
|
||||
const webpack = require('webpack')
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
context: join(__dirname, '..'),
|
||||
|
@ -27,5 +29,19 @@ module.exports = {
|
|||
}
|
||||
]
|
||||
},
|
||||
stats: 'minimal'
|
||||
stats: 'minimal',
|
||||
plugins: [
|
||||
// Don't include debug symbols ever
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production'
|
||||
}),
|
||||
|
||||
// Always minify, even in development.
|
||||
new UglifyJSPlugin({
|
||||
uglifyOptions: {
|
||||
compress: true,
|
||||
mangle: true
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
|
|
16923
assets/packed/app.js
16923
assets/packed/app.js
File diff suppressed because one or more lines are too long
|
@ -18,11 +18,12 @@
|
|||
"prettier-standard": "7.0.1",
|
||||
"standard": "10.0.3",
|
||||
"style-loader": "0.18.2",
|
||||
"uglifyjs-webpack-plugin": "0.4.6",
|
||||
"webpack": "3.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack --watch --progress --colors",
|
||||
"prepublish": "webpack",
|
||||
"dev": "webpack --watch --progress --colors -p",
|
||||
"prepublish": "webpack -p",
|
||||
"test": "jest",
|
||||
"jest-html": "jest-html"
|
||||
},
|
||||
|
|
|
@ -5712,7 +5712,7 @@ uglify-to-browserify@~1.0.0:
|
|||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
|
||||
|
||||
uglifyjs-webpack-plugin@^0.4.6:
|
||||
uglifyjs-webpack-plugin@0.4.6, uglifyjs-webpack-plugin@^0.4.6:
|
||||
version "0.4.6"
|
||||
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309"
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in New Issue