Fixing Browsersync Not Reloading
Presented with limited commercial interruption by:
I wanted to jot this down real quick while I work on the next version of this site. I’m using Gulp and Browsersync and for the life of me I couldn’t get the reload to actually take place. Turns out I didn’t specify properly what files Browsersync needs to trigger when changed. Here’s the gulp.task()
that worked for me:
gulp.task('browsersync', function (callback) {
browserSync.init({
proxy: 'localhost:2368',
files: ['app/ **/*.hbs', 'app/assets/scss/** /*.scss']
});
callback();
});
Note the files:
array added to the browserSync.init()
function. That’s the ticket, right there. Once I did that, it was magic sauce all over again.
Most Recent Posts
-
Initial Apple Studio Display Notes
Originally posted on March 21st, 2022 • 279 words • Journal
-
The Canonical Spicy Chicken Sandwich
Originally posted on January 10th, 2022 • 65 words • Lists
-
On Working Remotely
Originally posted on November 4th, 2021 • 3318 words • Productivity