1

I've created a watch for various file types, and all work perfectly except for html. I instead of using stream I have to use reload to ensure that the changes show. However, when I call browserSync.reload it reloads the browser but hangs. The message in git-bash stays at

[BS] Reloading Browsers...

And all watchers stop working at that point.

Here is the code

gulp.task('watch', ['browser-sync'], function () {
    watch([PATH_ALL_LESS], batch(function (events, done) {
        gulp.start('build:less', done);
    }));

    watch(['./client/**/*.ts', './client/**/*.js', './index-template.html'], batch(function (events, done) {
        gulp.start('watch-rebuild', done);
    }));

    watch(['./client/**/*.html'], browserSync.reload);
});
Smeegs
  • 9,151
  • 5
  • 42
  • 78

0 Answers0