diff --git a/frontend/build/webpack.prod.conf.js b/frontend/build/webpack.prod.conf.js index 444b16c..b7b1afb 100644 --- a/frontend/build/webpack.prod.conf.js +++ b/frontend/build/webpack.prod.conf.js @@ -9,7 +9,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin') const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') +const TerserPlugin = require('terser-webpack-plugin'); const env = require('../config/prod.env') @@ -87,12 +87,12 @@ const webpackConfig = merge(baseWebpackConfig, { }, runtimeChunk: 'single', minimizer: [ - new UglifyJsPlugin({ - uglifyOptions: { - warnings: false + new TerserPlugin({ + parallel: true, + sourceMap: true, + terserOptions: { + sourceMap: config.build.productionSourceMap, }, - sourceMap: config.build.productionSourceMap, - parallel: true }), ], }, diff --git a/frontend/package.json b/frontend/package.json index 5a652eb..950f600 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -58,7 +58,7 @@ "rimraf": "3", "semver": "7", "shelljs": "0", - "uglifyjs-webpack-plugin": "2", + "terser-webpack-plugin": "^2.3.2", "url-loader": "3", "vue-loader": "15", "vue-style-loader": "4",