Answer the question
In order to leave comments, you need to log in
Why won't the browsersync control panel load?
It just keeps trying to boot up and nothing happens. Everything else seems to be working normally.
This is how the settings in the gulpfile look like
const gulp = require('gulp');
const browserSync = require('browser-sync');
const sass = require('gulp-sass')(require('sass'));
const rename = require("gulp-rename");
const autoprefixer = require('gulp-autoprefixer');
const cleanCSS = require('gulp-clean-css');
const imagemin = require('gulp-imagemin');
const htmlmin = require('gulp-htmlmin');
gulp.task('server', function() {
browserSync.init({
server: {
baseDir: "dist"
}
});
gulp.watch("src/*.html").on("change", browserSync.reload);
});
gulp.task('styles', function() {
return gulp.src("src/sass/**/*.+(scss|sass)")
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(rename({suffix: '.min', prefix: ''}))
.pipe(autoprefixer())
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(gulp.dest("dist/css"))
.pipe(browserSync.stream());
});
"browser-sync": "^2.27.7",
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question