updated 压缩文件保留注释

This commit is contained in:
mumuy 2022-02-28 17:16:34 +08:00
parent 89cc657b63
commit 1164f70c89
2 changed files with 13 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,13 @@ const rename = require("gulp-rename");
gulp.task('mini', () => (
gulp.src('script/relationship.js')
.pipe(uglify())
.pipe(uglify({
output:{
comments: function(node, comment){
return /^!/.test(comment.value);
}
}
}))
.pipe(rename("relationship.min.js"))
.pipe(gulp.dest('dist/'))