New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BrowserSync: Reload HTML on Change #549
Comments
I created a recipe off the back of this question - first of all to prove my setup works, but also so other can benefit from it. https://github.com/BrowserSync/recipes/tree/master/recipes/gulp.swig Check it out :) |
@shakyShane I'm getting a |
@realph Could you show us the complete error log? |
Are the html files being written to your build directory? |
@shinnn I'm not getting an error. My HTML files are being written to my |
@realph Can you create a small repository that can reproduce the error you've run into? |
@shinnn Got the repo here. https://github.com/realph/gulp-zero |
@realph OK, I confirmed and solved the problem. It's not related to browser-sync itself. Disable swig's gulp.task('templates', function() {
return gulp.src('./src/*.html')
.pipe(swig({
defaults: {
cache: false
}
}))
.pipe(gulp.dest('./Build'))
.pipe(reload({stream: true}))
}); @shakyShane We should update the swig recipe, too. |
@shinnn Ahh, perfect! Thanks a lot. Should have probably had a look at the swig docs. Thanks again for all your help! |
I'm using Gulp + BrowserSync and I'm trying to reload my development website when changes are made to my HTML files, but I can't seem to get it working.
I'm getting no errors in the command line, my page seems to reload but the changes I've made don't appear in the browser, unless I quit the gulp task and run it again.
This is my current setup:
Any help with this is appreciated. Thanks in advance!
The text was updated successfully, but these errors were encountered: