GulpUglifyError:Unable to minify JavaScript
问题 I am trying to minify my script files for which i am using gulp task runner And I am trying gulp-uglify plugin Code: gulp.task('concat', function() { return gulp.src('app/**/*.js') // .pipe(concat('script.js')) .pipe(uglify()) .pipe(gulp.dest('./dist/')) }); but i am getting error as when i try to run gulp task as gulp concat Any help would be appreciated 回答1: The main error is generated when you're using ES6 format. Use the gulp-uglify-es module instead of 'gulp-uglify' to overcome this