I have been attempting to get live injecting working for two days now... Getting ready to give up as I've read the docks and more git is:issues than I want to repeat.
I don't use preprcessors like less or sass. I just want to have the changed CSS live reload through Browsersync. The page reloads if I save the file and my headers are set. I've tried so many options, my head is spinning. This is the latest iteration of my attempts. Anybody care to lead me to the right path?
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
gulp.task('serve', function() {
browserSync.init({
proxy: "https://subdomain.mysite.dev",
open: false,
browser: 'firefox-developer',
injectChanges: true,
logLevel: "debug"
});
gulp.watch("./style.css", ['css']);
});
gulp.task('css', function() {
return gulp.src('./style.css')
.pipe(autoprefixer('last 2 versions'))
.pipe(browserSync.stream());
});
gulp.task('default', ['serve']);
Kubuntu Linux 17.04
browser-sync --version
2.18.12
node -v
v7.10.0
npm -v
5.0.1