Merge pull request #10292 from wojtekmaj/replace-uglify-es-with-terser
Replace uglify-es with Terser
This commit is contained in:
commit
33fa33ec75
10
gulpfile.js
10
gulpfile.js
@ -717,18 +717,18 @@ gulp.task('minified-post', ['minified-pre'], function () {
|
||||
console.log();
|
||||
console.log('### Minifying js files');
|
||||
|
||||
var UglifyES = require('uglify-es');
|
||||
var Terser = require('terser');
|
||||
// V8 chokes on very long sequences. Works around that.
|
||||
var optsForHugeFile = { compress: { sequences: false, }, };
|
||||
|
||||
fs.writeFileSync(MINIFIED_DIR + '/web/pdf.viewer.js',
|
||||
UglifyES.minify(viewerFiles).code);
|
||||
Terser.minify(viewerFiles).code);
|
||||
fs.writeFileSync(MINIFIED_DIR + '/build/pdf.min.js',
|
||||
UglifyES.minify(pdfFile).code);
|
||||
Terser.minify(pdfFile).code);
|
||||
fs.writeFileSync(MINIFIED_DIR + '/build/pdf.worker.min.js',
|
||||
UglifyES.minify(pdfWorkerFile, optsForHugeFile).code);
|
||||
Terser.minify(pdfWorkerFile, optsForHugeFile).code);
|
||||
fs.writeFileSync(MINIFIED_DIR + 'image_decoders/pdf.image_decoders.min.js',
|
||||
UglifyES.minify(pdfImageDecodersFile).code);
|
||||
Terser.minify(pdfImageDecodersFile).code);
|
||||
|
||||
console.log();
|
||||
console.log('### Cleaning js files');
|
||||
|
29
package-lock.json
generated
29
package-lock.json
generated
@ -12982,6 +12982,35 @@
|
||||
"integrity": "sha512-IlqtmLVaZA2qab8epUXbVWRn3aB1imbDMJtjB3nu4X0NqPkcY/JH9ZtCBWKHWPxs8Svi9tyo8w2dBoi07qZbBA==",
|
||||
"dev": true
|
||||
},
|
||||
"terser": {
|
||||
"version": "3.10.12",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-3.10.12.tgz",
|
||||
"integrity": "sha512-3ODPC1eVt25EVNb04s/PkHxOmzKBQUF6bwwuR6h2DbEF8/j265Y1UkwNtOk9am/pRxfJ5HPapOlUlO6c16mKQQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "~2.17.1",
|
||||
"source-map": "~0.6.1",
|
||||
"source-map-support": "~0.5.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.17.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
|
||||
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.9",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz",
|
||||
"integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
|
@ -33,9 +33,9 @@
|
||||
"streamqueue": "^1.1.2",
|
||||
"systemjs": "^0.21.5",
|
||||
"systemjs-plugin-babel": "^0.0.25",
|
||||
"terser": "^3.10.12",
|
||||
"ttest": "^1.1.0",
|
||||
"typogr": "^0.6.8",
|
||||
"uglify-es": "^3.3.9",
|
||||
"vinyl": "^2.2.0",
|
||||
"vinyl-fs": "^3.0.3",
|
||||
"webpack": "4.21.0",
|
||||
|
Loading…
Reference in New Issue
Block a user