Use gulp-terser instead of gulp-uglify for ES2015

This commit is contained in:
djmaze 2020-03-20 16:26:42 +01:00
parent 15ceddc202
commit a8100d34f8
2 changed files with 6 additions and 6 deletions

View file

@ -87,7 +87,6 @@
"gulp-sourcemaps": "2.6.5",
"gulp-stripbom": "1.0.5",
"gulp-through": "0.4.0",
"gulp-uglify": "3.0.2",
"gulp-util": "3.0.8",
"gulp-zip": "5.0.1",
"ifvisible.js": "1.0.6",
@ -119,5 +118,8 @@
"underscore": "1.9.2",
"webpack": "4.41.5",
"webpack-cli": "3.3.10"
},
"dependencies": {
"gulp-terser": "^1.2.0"
}
}

View file

@ -5,7 +5,7 @@ const concat = require('gulp-concat-util'),
header = require('gulp-header'),
rename = require('gulp-rename'),
replace = require('gulp-replace'),
uglify = require('gulp-uglify'),
terser = require('gulp-terser'),
plumber = require('gulp-plumber'),
gulpif = require('gulp-if'),
eol = require('gulp-eol'),
@ -65,10 +65,8 @@ const jsMin = () =>
.pipe(replace(/"rainloop\/v\/([^/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
.pipe(rename({ suffix: '.min' }))
.pipe(
uglify({
mangle: true,
compress: true,
ie8: false
terser({
output: {comments: false}
})
)
.pipe(eol('\n', true))