var gulp = require('gulp');
var uglify = require('gulp-uglify');
//压缩并输出html
gulp.task('minihtml',function(){
gulp.src('./src/*.html')
.pipe(uglify())
.pipe(gulp.dest('./dist/'));
});
当我执行gulp minihtml时,出现events.js:141
throw er;//unhandled 'error' event. 详细如图:
请问怎么解决?
你用错插件了吧
gulp-minify-html这才是压缩html的
uglify是压缩js的