4 Gulp, browsersync, how to make it work?

Guys. help in gulp 4, faced with gulp for the first time and couldn't get browsersync to work here in this code
almost everywhere ostervala information gulp 3
const gulp = require('gulp');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const watch = require('gulp-watch');


gulp.task('sass-compile', function () {
 return gulp.src('./scss/**/*.scss')
.pipe(sourcemaps.init())
 .pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./css/'));
})


gulp.task('watch', function(){
gulp.watch('./scss/**/*.scss',gulp.series('sass-compile'));
});
March 23rd 20 at 19:35
1 answer
March 23rd 20 at 19:37
Solution
So try Gulp4:
const
 gulp = require('gulp'),
 sass = require('gulp-sass'),
 sourcemaps = require('gulp-sourcemaps');
 browsersync = require("browser-sync").create ()


gulpSass function() {
 return gulp
.src('./scss/**/*.scss')
.pipe(sourcemaps.init())
 .pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./css'))
.pipe(browsersync.stream())
}


browserSync function(done) {
browsersync.init({
 injectChanges: true,
 server: {
 baseDir: "./"
},
 port: 3000,
 notify: false
});
done();
}


watchFiles, function(done) {
 gulp.watch('./scss/**/*.scss', gulp.parallel(gulpSass));
done();
}

const watch = gulp.parallel(watchFiles, browserSync);


exports.watch = watch;

function reload(done) {
browsersync.reload();
done();
}


Only install browsersync , without it nothing happens)

Find more questions by tags Gulp.js