Browsersync reload in a loop
See original GitHub issueHi
Issue details
For some time I have a problems with Browsersync. I have a web front-end workflow with Gulp, Browsersync, SASS and Nunjucks. Gulp compile my Nunjucks files. At the end of this task, browser is reloaded with Browsersync. Before a few days browsersync reloaded browser just once. Now it reload browser as many times as there are nunjucks files.
Please specify which version of Browsersync, node and npm you’re running
- Browsersync [ 2.13.0 ]
- Node [ 6.9.1 ]
- Npm [ 4.0.2 ]
Affected platforms
- windows
Browsersync use-case
- Gulp
gulp.task('njk', function () {
return gulp.src(templatesInput)
.pipe(nunjucksRender({
path: templatesFolder,
ext: '.html'
}))
.pipe(gulp.dest(templatesOutput))
.pipe(browserSync.stream());
});
gulp.task('serve', function () {
browserSync.init({
server: {
baseDir: render
}
});
// Watch Sass
gulp.watch(scssInput, ['css']).on('change', function (event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
});
// Watch nunjuck
gulp.watch(templatesInput, ['njk']).on('change', function (event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
});
});
gulp.task('default', ['serve', 'css', 'njk']);
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Browsersync page refresh loop - sage - Roots Discourse
BrowserSync keeps reloading infinitely upon JavaScript changes. Infinite reload on Javascript Changes (Docker environment - boilerplate ...
Read more >Browsersync keeps reloading - Stack Overflow
Browsersync has a log that you can inspect to see which files are being changed that trigger the reload. You can also increase...
Read more >Browsersync options
Reload each browser when Browsersync is restarted. // don't auto-reload all browsers following a Browsersync reload ...
Read more >How to configure and Set Up Gulp Browser-sync - eduCBA
The BrowserSync is utilized to observe all HTML and CSS documents in the CSS catalog and plays out the life reload to the...
Read more >Getting Browsersync running with Gulp 4 and Valet
Set the username and site name variables, choose either http v https for the browser reload and update any paths you need watched....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I may be on the same bug with Laravel 5.4 / Laravel Mix. =S
Related to #439 and #981?
Any plans to fix this in the near future? Just ran into that bug again in 2021.