【发布时间】:2019-08-27 14:26:19
【问题描述】:
我正在使用 gulp 版本 4,但我遇到了 javascript 任务的无限循环问题。我真的不明白是什么导致了循环。
// JS
function javascript() {
return gulp
.src([paths.js, paths.excludeJS.minJs, paths.excludeJS.underscored], {base: "./"})
.pipe(plumber({errorHandler: onError}))
.pipe(include({
includePaths: [paths.source]
}))
.pipe(babel())
.pipe(ignore.include(paths.excludeJS.underscored))
.pipe(rename(function (path) {
path.basename += ".min";
path.extname = ".js";
}))
.pipe(gulp.dest("./"));
}
exports.default = watch;
exports.js = javascript;
【问题讨论】:
标签: javascript gulp gulp-watch