Why is browsersync not injecting the css correctly? Here is my code:
const gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync');
gulp.task('sass', () =>
gulp.src('./scss/*.scss')
.pipe(sass({
outputStyle: 'expanded',
sourceComments:true
}))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(sass())
.pipe(gulp.dest('./'))
);
gulp.task('browser-sync', function() {
browserSync.init(["*.*"], {
proxy: "http://localhost/wordpress_25denoviembre"
});
.pipe(browserSync.stream());
});
gulp.task('default', ['sass', 'browser-sync'], function () {
gulp.watch('./scss/*.scss', ['sass']);
});
Even though it detects all types of .html, .php, and .js files, when compiling from .scss to .css nothing happens. I am running two consoles, one for executing gulp (to compile sass) and the other for browser-sync.
Your help in solving this issue would be greatly appreciated.