Skip to content

Commit 0e5cf4a

Browse files
authored
chore: switch from uglifyjs-webpack-plugin to terser-webpack-plugin (#2742)
closes #2245
1 parent ae8a90c commit 0e5cf4a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/@vue/cli-service/lib/config/prod.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ module.exports = (api, options) => {
2626
if (process.env.VUE_CLI_TEST) {
2727
webpackConfig.optimization.minimize(false)
2828
} else {
29-
const UglifyPlugin = require('uglifyjs-webpack-plugin')
30-
const uglifyOptions = require('./uglifyOptions')
29+
const TerserPlugin = require('terser-webpack-plugin')
30+
const terserOptions = require('./terserOptions')
3131
webpackConfig.optimization.minimizer([
32-
new UglifyPlugin(uglifyOptions(options))
32+
new TerserPlugin(terserOptions(options))
3333
])
3434
}
3535
}

packages/@vue/cli-service/lib/config/uglifyOptions.js renamed to packages/@vue/cli-service/lib/config/terserOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = options => ({
2-
uglifyOptions: {
2+
terserOptions: {
33
compress: {
44
// turn off flags with small gains to speed up minification
55
arrows: false,

packages/@vue/cli-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
"source-map-url": "^0.4.0",
6161
"ssri": "^6.0.0",
6262
"string.prototype.padend": "^3.0.0",
63+
"terser-webpack-plugin": "^1.1.0",
6364
"thread-loader": "^1.1.5",
64-
"uglifyjs-webpack-plugin": "^1.2.7",
6565
"url-loader": "^1.1.0",
6666
"vue-loader": "^15.4.2",
6767
"webpack": "^4.15.1",

0 commit comments

Comments
 (0)