Feature/#46 replace gulp uglify es with terser #47
|
@ -1,7 +1,7 @@
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const cssnano = require('cssnano')
|
const cssnano = require('cssnano')
|
||||||
const gulpLoadPlugins = require('gulp-load-plugins')
|
const gulpLoadPlugins = require('gulp-load-plugins')
|
||||||
const uglify = require('gulp-uglify-es').default;
|
const terser = require('terser');
|
||||||
const del = require('del');
|
const del = require('del');
|
||||||
const browserify = require('browserify');
|
const browserify = require('browserify');
|
||||||
const babelify = require('babelify');
|
const babelify = require('babelify');
|
||||||
|
@ -118,7 +118,7 @@ gulp.task('scripts', () => {
|
||||||
.pipe(source('app.js'))
|
.pipe(source('app.js'))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe($.if(isDev, $.sourcemaps.init({ loadMaps: true })))
|
.pipe($.if(isDev, $.sourcemaps.init({ loadMaps: true })))
|
||||||
.pipe(uglify({ compress: { drop_console: isProd, drop_debugger: isProd } }))
|
.pipe($.terser({ compress: { drop_console: isProd, drop_debugger: isProd } }))
|
||||||
.pipe($.rename({ suffix: '.min' }))
|
.pipe($.rename({ suffix: '.min' }))
|
||||||
.pipe($.size({
|
.pipe($.size({
|
||||||
showFiles: true,
|
showFiles: true,
|
||||||
|
|
Loading…
Reference in a new issue