Answer the question
In order to leave comments, you need to log in
How to configure browser-sync for OpenServer?
Good afternoon. Recently, I finally set up browser sync for gulp and felt how good it is =)
But there is a problem, I don’t understand how to make it reload the site on another local server, in my case I work with open-server. Maybe someone has already solved this problem?
Answer the question
In order to leave comments, you need to log in
configured as follows:
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
gulp.task('browser-sync', function() {
browserSync.init({
proxy: "apple"
});
});
gulp.task('bs-reload', function () {
browserSync.reload();
});
gulp.task('watch-css', function () {
gulp.watch("../assets/static_file/**/*.tpl", ['bs-reload'])
});
//default
gulp.task('default', ['browser-sync','watch-css']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question