Answer the question
In order to leave comments, you need to log in
How to setup browser-sync in gulp 4?
Good time, can someone help set up browser-sync in gulp 4. before that, I set it up in gulp 3. There were no problems, but now I watched a bunch of videos and sites and didn’t understand anything. At the moment I want to set up only browser-sync without sass and stuff
Answer the question
In order to leave comments, you need to log in
const browserSync = require('browser-sync');
let config = {
server: {
baseDir: "./dist"
},
host: 'localhost',
port: 3000,
logPrefix: "Site"
};
gulp.task('webserver', function () {
browserSync(config);
});
.pipe(reload({
stream: true
}));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question