when I change a script file, Browser Sync will reload 2 or 3 times
I using Jade and Coffee.
when I change the script file, browser reload 2 or 3 times, it make my computer lag.
and I try to change file glup/scripts.js task scripts-reload to
gulp.task('scripts-reload', function() {
return buildScripts()
.pipe(browserSync.stream({once: true}));
});
added {once: true} opt.
it just reload 1 time now, but sometime file change was not sync to browser, I need to press F5 to reload 1 more time by myself.
some one has any idea?
(sorry for my pool English...)
We had similar problem and were trying to set up timeouts, tried different options, but it didn't work. So we end up disabling auto-reload, and doing it manually.
So we had plain watch task to listen to file modifications. In case of event we triggered scripts styles etc rebuild, and only when that finished triggered require("browser-sync").get('frontend').reload();
I think this is a problem for medium and large-sized projects, because it needs to build a lot