diff --git a/package.json b/package.json index 3b696bc2e..2c04aa351 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/tasks/js.js b/tasks/js.js index 0258ad2fc..a7c46bad7 100644 --- a/tasks/js.js +++ b/tasks/js.js @@ -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))