Answer the question
In order to leave comments, you need to log in
Gulp does not automatically update the page, although it starts normally, how can I fix it or what needs to be added?
I launch the gallp, it starts, but when css changes, it does not automatically update the page, and if you change and save it, then it updates what to do so that it automatically monitors the change in the file (css, html, js ...). Here is my gulp file
// Including packages
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
gulp.task('server', function() {
browserSync.init({
server: {baseDir: './src/'}
});
gulp.watch('src/**/*.html').on( 'change', browserSync.reload);
gulp.watch('src/css/**/*.css').on('change', browserSync.reload);
gulp.watch('src/js/**/ *.js').on('change', browserSync.reload);
gulp.task('default', ['server']);
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