Answer the question
In order to leave comments, you need to log in
Why is the page not refreshing when adding/removing images[BrowserSync]?
Good afternoon.
Faced with the situation that BrowserSync does not want to update the page only when deleting / adding pictures.
// ==================== IMAGES ====================
gulp.task('img', function () {
clear.sync(path.clear.img);
return gulp.src(path.src.img)
.pipe(filter(function (file) {
return !/\/_/.test(file.path) && !/^_/.test(file.relative);
}))
.pipe(rename({dirname: ''}))
.pipe(gulp.dest(path.build.img))
.pipe(browserSync.reload({stream: true}));
});
// IMG WATCH
watch(path.watch.img, function() {
gulp.start('img');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question