aboutsummaryrefslogtreecommitdiff
path: root/juick-server/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-08 19:51:10 +0300
committerGravatar Vitaly Takmazov2018-11-08 19:51:10 +0300
commit31a4fc0bc7735a7ff670499deafd0364522df344 (patch)
tree13942fbe7084bd59aee368c532f1ff94ef72dfac /juick-server/webpack.config.js
parent33db128d4ddf9affd0f4c95fe89d3e7421e37285 (diff)
uglifyjs -> terser
Diffstat (limited to 'juick-server/webpack.config.js')
-rw-r--r--juick-server/webpack.config.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/juick-server/webpack.config.js b/juick-server/webpack.config.js
index 1b0a9a52..8057ec15 100644
--- a/juick-server/webpack.config.js
+++ b/juick-server/webpack.config.js
@@ -1,6 +1,6 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const StyleLintPlugin = require('stylelint-webpack-plugin');
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
+const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
module.exports = (env, argv) => {
@@ -55,10 +55,16 @@ module.exports = (env, argv) => {
if (!dev) {
config.optimization = {
minimizer: [
- new UglifyJsPlugin({
+ new TerserPlugin({
cache: true,
parallel: true,
- sourceMap: dev
+ sourceMap: dev,
+ terserOptions: {
+ output: {
+ comments: /@license/i
+ }
+ },
+ extractComments: true
}),
new OptimizeCSSAssetsPlugin({})
]