Error: watching src/*: watch task has to be a function (optionally generated by using gulp.parallel

Error: watching src/*: watch task has to be a function (optionally generated by using gulp.parallel or gulp.series)



gulp4.0之前的版本:


 Gulp.watch(“监听的文件”,[任务名字符串])


gulp.watch('src/*',['dest']);



gulp4.0之后的写法 :


Gulp.watch(“监听的文件”,回调函数)。

ulp.watch('src/**/*.js',async ()=>{});

评论 (0)

发表评论