grab one minimizer rather than three

Apparently WebPack builds in "terser", which is what the cool kids use.
Just go with the default and simplify the configuration as well as
installing fewer node modules.

"babel-minify-webpack-plugin" wasn't actually being used, and
babel-minify is still in beta anyway.

uglifyjs, according to https://github.com/webpack/webpack/issues/7923,
doesn't support ES6 and depends on a package which is no longer
maintained.
This commit is contained in:
Scott Lamb 2020-03-01 21:23:29 -08:00
parent 4b397670a4
commit b298bd13f2
3 changed files with 2 additions and 229 deletions

View File

@ -20,7 +20,6 @@
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-minify-webpack-plugin": "^0.3.0",
"babel-plugin-transform-imports": "^1.5.0",
"babel-preset-env": "^1.6.1",
"clean-webpack-plugin": "^0.1.18",
@ -33,7 +32,6 @@
"html-webpack-plugin": "^3.0.6",
"prettier": "1.11.1",
"style-loader": "^0.19.0",
"uglifyjs-webpack-plugin": "^1.2.3",
"webpack": "^4.0.1",
"webpack-cli": "^2.0.10",
"webpack-dev-server": "^3.1.0",

View File

@ -54,33 +54,6 @@ module.exports = (env, args) => {
},
optimization: {
minimize: true,
minimizer: [
{
apply: (compiler) => {
/**
* Setup the UglifyJsPlugin as webpack4 does, plus options
* we decide to override.
*/
// Lazy load the uglifyjs plugin
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
new UglifyJsPlugin({
cache: true, // webpack4: default
parallel: true, // webpack4: default
sourceMap: true,
uglifyOptions: {
compress: {
keep_infinity: true, // Do not change to 1/0
warnings: false, // Do not warn when dropping
},
output: {
// Eliminate most comments, but not marked ones
comments: 'some',
},
},
}).apply(compiler);
},
},
],
splitChunks: {
minSize: 30000,
minChunks: 1,

202
yarn.lock
View File

@ -335,7 +335,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
esutils "^2.0.2"
js-tokens "^3.0.2"
babel-core@^6.24.1, babel-core@^6.26.0:
babel-core@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8"
dependencies:
@ -406,10 +406,6 @@ babel-helper-define-map@^6.24.1:
babel-types "^6.26.0"
lodash "^4.17.4"
babel-helper-evaluate-path@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.3.0.tgz#2439545e0b6eae5b7f49b790acbebd6b9a73df20"
babel-helper-explode-assignable-expression@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
@ -427,10 +423,6 @@ babel-helper-explode-class@^6.24.1:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
babel-helper-flip-expressions@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.3.0.tgz#f5b6394bd5219b43cf8f7b201535ed540c6e7fa2"
babel-helper-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
@ -455,18 +447,6 @@ babel-helper-hoist-variables@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
babel-helper-is-nodes-equiv@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684"
babel-helper-is-void-0@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-helper-is-void-0/-/babel-helper-is-void-0-0.3.0.tgz#95570d20bd27b2206f68083ae9980ee7003d8fe7"
babel-helper-mark-eval-scopes@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.3.0.tgz#b4731314fdd7a89091271a5213b4e12d236e29e8"
babel-helper-optimise-call-expression@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
@ -492,10 +472,6 @@ babel-helper-remap-async-to-generator@^6.24.1:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
babel-helper-remove-or-void@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.3.0.tgz#f43c86147c8fcc395a9528cbb31e7ff49d7e16e3"
babel-helper-replace-supers@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
@ -507,10 +483,6 @@ babel-helper-replace-supers@^6.24.1:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
babel-helper-to-multiple-sequence-expressions@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.3.0.tgz#8da2275ccc26995566118f7213abfd9af7214427"
babel-helpers@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
@ -532,85 +504,12 @@ babel-messages@^6.23.0:
dependencies:
babel-runtime "^6.22.0"
babel-minify-webpack-plugin@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.3.0.tgz#98062b4b7fb96ec67cca97579151758a1ddde116"
dependencies:
babel-core "^6.24.1"
babel-preset-minify "^0.3.0"
webpack-sources "^1.0.1"
babel-plugin-check-es2015-constants@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
dependencies:
babel-runtime "^6.22.0"
babel-plugin-minify-builtins@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.3.0.tgz#4740117a6a784063aaf8f092989cf9e4bd484860"
dependencies:
babel-helper-evaluate-path "^0.3.0"
babel-plugin-minify-constant-folding@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.3.0.tgz#687e40336bd4ddd921e0e197f0006235ac184bb9"
dependencies:
babel-helper-evaluate-path "^0.3.0"
babel-plugin-minify-dead-code-elimination@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.3.0.tgz#a323f686c404b824186ba5583cf7996cac81719e"
dependencies:
babel-helper-evaluate-path "^0.3.0"
babel-helper-mark-eval-scopes "^0.3.0"
babel-helper-remove-or-void "^0.3.0"
lodash.some "^4.6.0"
babel-plugin-minify-flip-comparisons@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.3.0.tgz#6627893a409c9f30ef7f2c89e0c6eea7ee97ddc4"
dependencies:
babel-helper-is-void-0 "^0.3.0"
babel-plugin-minify-guarded-expressions@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.3.0.tgz#2552d96189ef45d9a463f1a6b5e4fa110703ac8d"
dependencies:
babel-helper-flip-expressions "^0.3.0"
babel-plugin-minify-infinity@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.3.0.tgz#c5ec0edd433517cf31b3af17077c202beb48bbe7"
babel-plugin-minify-mangle-names@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.3.0.tgz#f28561bad0dd2f0380816816bb946e219b3b6135"
dependencies:
babel-helper-mark-eval-scopes "^0.3.0"
babel-plugin-minify-numeric-literals@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.3.0.tgz#b57734a612e8a592005407323c321119f27d4b40"
babel-plugin-minify-replace@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.3.0.tgz#980125bbf7cbb5a637439de9d0b1b030a4693893"
babel-plugin-minify-simplify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.3.0.tgz#14574cc74d21c81d3060fafa041010028189f11b"
dependencies:
babel-helper-flip-expressions "^0.3.0"
babel-helper-is-nodes-equiv "^0.0.1"
babel-helper-to-multiple-sequence-expressions "^0.3.0"
babel-plugin-minify-type-constructors@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.3.0.tgz#7f5a86ef322c4746364e3c591b8514eeafea6ad4"
dependencies:
babel-helper-is-void-0 "^0.3.0"
babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
@ -899,22 +798,6 @@ babel-plugin-transform-imports@^1.5.0:
lodash.kebabcase "^4.1.1"
lodash.snakecase "^4.1.1"
babel-plugin-transform-inline-consecutive-adds@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.3.0.tgz#f07d93689c0002ed2b2b62969bdd99f734e03f57"
babel-plugin-transform-member-expression-literals@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.0.tgz#ab07ad52a11ff7d2528c71388e8f901a4499c2b2"
babel-plugin-transform-merge-sibling-variables@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.0.tgz#140017e305f8eb4f60d2f2db61154fbd71a9fcdd"
babel-plugin-transform-minify-booleans@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.0.tgz#e36ceaa49aadcae70ec98bd9dbccb660719a667a"
babel-plugin-transform-object-rest-spread@^6.22.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
@ -922,40 +805,12 @@ babel-plugin-transform-object-rest-spread@^6.22.0:
babel-plugin-syntax-object-rest-spread "^6.8.0"
babel-runtime "^6.26.0"
babel-plugin-transform-property-literals@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.0.tgz#4ddc12ada888927eacab4daff8a535ebc5de5a61"
dependencies:
esutils "^2.0.2"
babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
dependencies:
regenerator-transform "^0.10.0"
babel-plugin-transform-regexp-constructors@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.3.0.tgz#9bb2c8dd082271a5cb1b3a441a7c52e8fd07e0f5"
babel-plugin-transform-remove-console@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.0.tgz#a7b671aab050dd30ef7cf2142b61a7d10efb327f"
babel-plugin-transform-remove-debugger@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.0.tgz#b465e74b3fbe1970da561fb1331e30aefac3f1fe"
babel-plugin-transform-remove-undefined@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.3.0.tgz#03f5f0071867781e9beabbc7b77bf8095fd3f3ec"
dependencies:
babel-helper-evaluate-path "^0.3.0"
babel-plugin-transform-simplify-comparison-operators@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.0.tgz#586252fea023cb13f2400a09c0ab178dc0844f0a"
babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
@ -963,10 +818,6 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
babel-plugin-transform-undefined-to-void@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.0.tgz#eb5db0554caffe9ded0206468ec0c6c3b332b9d2"
babel-preset-env@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48"
@ -1031,34 +882,6 @@ babel-preset-es2015@^6.9.0:
babel-plugin-transform-es2015-unicode-regex "^6.24.1"
babel-plugin-transform-regenerator "^6.24.1"
babel-preset-minify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-preset-minify/-/babel-preset-minify-0.3.0.tgz#7db64afa75f16f6e06c0aa5f25195f6f36784d77"
dependencies:
babel-plugin-minify-builtins "^0.3.0"
babel-plugin-minify-constant-folding "^0.3.0"
babel-plugin-minify-dead-code-elimination "^0.3.0"
babel-plugin-minify-flip-comparisons "^0.3.0"
babel-plugin-minify-guarded-expressions "^0.3.0"
babel-plugin-minify-infinity "^0.3.0"
babel-plugin-minify-mangle-names "^0.3.0"
babel-plugin-minify-numeric-literals "^0.3.0"
babel-plugin-minify-replace "^0.3.0"
babel-plugin-minify-simplify "^0.3.0"
babel-plugin-minify-type-constructors "^0.3.0"
babel-plugin-transform-inline-consecutive-adds "^0.3.0"
babel-plugin-transform-member-expression-literals "^6.9.0"
babel-plugin-transform-merge-sibling-variables "^6.9.0"
babel-plugin-transform-minify-booleans "^6.9.0"
babel-plugin-transform-property-literals "^6.9.0"
babel-plugin-transform-regexp-constructors "^0.3.0"
babel-plugin-transform-remove-console "^6.9.0"
babel-plugin-transform-remove-debugger "^6.9.0"
babel-plugin-transform-remove-undefined "^0.3.0"
babel-plugin-transform-simplify-comparison-operators "^6.9.0"
babel-plugin-transform-undefined-to-void "^6.9.0"
lodash.isplainobject "^4.0.6"
babel-preset-stage-1@^6.5.0:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0"
@ -1374,7 +1197,7 @@ bytes@3.0.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
cacache@^10.0.1, cacache@^10.0.4:
cacache@^10.0.1:
version "10.0.4"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460"
dependencies:
@ -4383,10 +4206,6 @@ lodash.findkey@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.findkey/-/lodash.findkey-4.6.0.tgz#83058e903b51cbb759d09ccf546dea3ea39c4718"
lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
lodash.kebabcase@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
@ -4399,10 +4218,6 @@ lodash.snakecase@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
lodash.some@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
@ -7052,19 +6867,6 @@ uglifyjs-webpack-plugin@^1.1.1, uglifyjs-webpack-plugin@^1.2.2:
webpack-sources "^1.1.0"
worker-farm "^1.5.2"
uglifyjs-webpack-plugin@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.3.tgz#bf23197b37a8fc953fecfbcbab66e506f9a0ae72"
dependencies:
cacache "^10.0.4"
find-cache-dir "^1.0.0"
schema-utils "^0.4.5"
serialize-javascript "^1.4.0"
source-map "^0.6.1"
uglify-es "^3.3.4"
webpack-sources "^1.1.0"
worker-farm "^1.5.2"
underscore@~1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"