Marc Blase

gulp.watch not firing with changed files when run in WSL

Using WSL Debian for dev and gulp.watch is not running when files are changed on the Windows side. Solution is to add {interval: 1000, usePolling: true} to the gulp.watch event.

For example, here’s the styles portion of my gulp.watch task.

gulp.watch([path.source + 'styles/**/*'], {interval: 1000, usePolling: true}, gulp.series('styles'));
Published on August 19, 2020