I
I
IvanRobot2016-01-09 22:29:35
gulp.js
IvanRobot, 2016-01-09 22:29:35

Why does browser-sync write "Reloading Browsers..." in the console, but no update occurs?

b4023e2cf4784cc4ae5c68bf650bdfb9.pnggulpfile.js

var gulp = require('gulp')
var jade = require('gulp-jade')
var browserSync = require('browser-sync').create()

gulp.task('jade', function(){
  gulp.src('app/shit*/*.jade', {base: 'app'})
    .pipe(jade())
    .pipe(gulp.dest('build'))
})

gulp.task('watch', function() {
  gulp.watch('app/shit*/*.jade', ['jade'])
})

gulp.task('browser-sync', function() {
    browserSync.init({
        server: {
            baseDir: "build"
        }
    });

    gulp.watch("build/**/*.html", browserSync.reload);
    gulp.watch("build/**/*.css", browserSync.reload);
});

gulp.task('default', ['watch', 'browser-sync'])

64286fa673de45b1b111e728eab88b1b.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Strukov, 2016-01-09
@pm_wanderer

There you also need to do css injection like
Otherwise, the browser does not update the styles

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question