From e3132c42980a4ccc64efc780f5c9305f0de3c6d0 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 29 Nov 2018 17:33:06 +0100 Subject: [PATCH] Move from UglifyJS to Terser Since uglify-es is no longer maintained, terser should be used instead. --- build/webpack.base.conf.js | 4 ++-- package.json | 2 +- yarn.lock | 24 +----------------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 5fa1dc5..7d7d160 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -9,7 +9,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin') const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); const ServiceWorkerWebpackPlugin = require("serviceworker-webpack-plugin"); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') +const TerserPlugin = require('terser-webpack-plugin') const VueLoaderPlugin = require('vue-loader/lib/plugin') const utils = require('./utils') @@ -28,7 +28,7 @@ module.exports = { }, optimization: { minimizer: [ - new UglifyJsPlugin({ + new TerserPlugin({ cache: true, parallel: true }), diff --git a/package.json b/package.json index 084db92..c10ae40 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "stylus-loader": "^3.0.2", "svg-url-loader": "^2.3.2", "svg2png": "^4.1.1", - "uglifyjs-webpack-plugin": "^2.0.1", + "terser-webpack-plugin": "^1.1.0", "url-loader": "^1.1.2", "vue-loader": "^15.4.2", "vue-style-loader": "^4.1.2", diff --git a/yarn.lock b/yarn.lock index 324e791..376bc7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1634,7 +1634,7 @@ cacache@^10.0.4: unique-filename "^1.1.0" y18n "^4.0.0" -cacache@^11.0.2, cacache@^11.2.0: +cacache@^11.0.2: version "11.3.1" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f" integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA== @@ -9092,28 +9092,6 @@ uglify-js@3.3.x: commander "~2.15.0" source-map "~0.6.1" -uglify-js@^3.0.0: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== - dependencies: - commander "~2.17.1" - source-map "~0.6.1" - -uglifyjs-webpack-plugin@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.0.1.tgz#f346af53ed496ce72fef462517d417f62bec3010" - integrity sha512-1HhCHkOB6wRCcv7htcz1QRPVbWPEY074RP9vzt/X0LF4xXm9l4YGd0qja7z88abDixQlnVwBjXsTBs+Xsn/eeQ== - dependencies: - cacache "^11.2.0" - find-cache-dir "^2.0.0" - schema-utils "^1.0.0" - serialize-javascript "^1.4.0" - source-map "^0.6.1" - uglify-js "^3.0.0" - webpack-sources "^1.1.0" - worker-farm "^1.5.2" - unbzip2-stream@^1.0.9: version "1.2.5" resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz#73a033a567bbbde59654b193c44d48a7e4f43c47"