aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-05-31 18:59:35 +0200
committerGitHub <noreply@github.com>2023-05-31 18:59:35 +0200
commit27303c6be09b8fc24c13454deae234e480cbf995 (patch)
tree16479591d00d12db7f3e4341c10a35111835ecef /package.json
parent988a56847de301ce18a653f84b07c5af432a269f (diff)
downloadjquery-27303c6be09b8fc24c13454deae234e480cbf995.tar.gz
jquery-27303c6be09b8fc24c13454deae234e480cbf995.zip
Build: Switch the minifier from UglifyJS to Terser
UglifyJS is ES5-only, while Terser supports newer ECMAScript versions. jQuery is authored in ES5 but jQuery 4.x will also have an ESM build that cannot be minified using UglifyJS directly. We could strip the `export` statement, minify via UglifyJS and re-add one but that increases complexity & may not fully play nice with source maps. On the other hand, switching to Terser increases the minfied size by just 324 bytes and the minified gzipped one by just 70 bytes. Such differences largely disappear among bigger size gains from the `3.x-stable` line - around 2.7 KB minified gzipped as of now. Closes gh-5258
Diffstat (limited to 'package.json')
-rw-r--r--package.json6
1 files changed, 3 insertions, 3 deletions
diff --git a/package.json b/package.json
index 31166d31f..56eaa6822 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,6 @@
"grunt-babel": "8.0.0",
"grunt-cli": "1.4.3",
"grunt-compare-size": "0.4.2",
- "grunt-contrib-uglify": "3.4.0",
"grunt-contrib-watch": "1.1.0",
"grunt-eslint": "24.0.0",
"grunt-git-authors": "3.2.0",
@@ -43,6 +42,7 @@
"grunt-karma": "4.0.2",
"grunt-newer": "1.3.0",
"grunt-npmcopy": "0.2.0",
+ "grunt-terser": "2.0.0",
"gzip-js": "0.3.2",
"husky": "4.2.5",
"jsdom": "19.0.0",
@@ -67,8 +67,8 @@
"rollup": "2.21.0",
"sinon": "7.3.1",
"strip-json-comments": "3.1.1",
- "testswarm": "1.1.2",
- "uglify-js": "3.4.7"
+ "terser": "5.17.6",
+ "testswarm": "1.1.2"
},
"scripts": {
"build": "npm install && grunt",