Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gulp.task('watch', gulp.series('clean', gulp.parallel('css')), gulp.watch(['./app/scss/**/*.scss'], gulp.series('clean', gulp.parallel('css'))) );
当出于某种原因在我的 gulpfile 中使用任何其他任务时,正在调用 gulp.watch。有谁知道这个任务出了什么问题?
gulp.task('watch', gulp.series('clean', gulp.parallel('css')), () => { gulp.watch(['./app/scss/**/*.scss'], gulp.series('clean', gulp.parallel('css'))) } );
看来问题是直接调用 gulp.watch 函数,而不是从函数内部调用。上面的代码解决了这个问题。