Answer the question
In order to leave comments, you need to log in
Why won't the page refresh?
gulpfile.js code
var gulp = require('gulp');
var connect = require('gulp-connect');
// gulp.task('less' , function(){
// gulp.src('dist/*.less')
// .pipe(less())
// .pipe(gulp.dest('dist/style.css'))
// .pipe(connect.reload());
// })
gulp.task('html', function () {
gulp.src('dist/index.html')
.pipe(connect.reload());
});
gulp.task('connect' , function(){
connect.server({
root:'dist',
livereload: true,
port:8888
})
})
gulp.task('watch' , function(){
//gulp.watch('dist/*.less' , ['less']);
gulp.watch('dist/index.html' , ['html']);
})
gulp.task('default', [ 'connect' , 'watch' , 'html' ]);
Answer the question
In order to leave comments, you need to log in
Found a solution
All you need to do is downgrade the gulp-connect plugin to 2.3.1
https://github.com/AveVlad/gulp-connect/issues/165
While saving what?
If there are less files then you have commented out less watcher.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question