Так пробуйте с Gulp4:
const
gulp = require('gulp'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps');
browsersync = require("browser-sync").create(),
function gulpSass() {
return gulp
.src('./scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./css'))
.pipe(browsersync.stream())
}
function browserSync(done) {
browsersync.init({
injectChanges: true,
server: {
baseDir: "./"
},
port: 3000,
notify: false
});
done();
}
function watchFiles(done) {
gulp.watch('./scss/**/*.scss', gulp.parallel(gulpSass));
done();
}
const watch = gulp.parallel(watchFiles, browserSync);
exports.watch = watch;
function reload(done) {
browsersync.reload();
done();
}
Только установите
browsersync , без него ничего не получится)