输出 gulp-uglify 压缩js文件时报错信息
gulp.task('es6', function () {
return gulp.src('src/main/webapp/bower_components/**/*.js') // 加return,finish后马上结束,但显示总时间长
.pipe(uglify())
.on('error', createErrorHandler('uglify'))
.pipe(gulp.dest('src/main/webapp/build'));
}); var createErrorHandler = function (name) {
return function (err) {
delete err.cause.stack;
console.error('Error from ' + name + ' in compress task', err.cause);
};
};