title: Gulp 4 & BrowserSync: Style Injection?
body: <p>I'm attempting to use browser-sync with Gulp 4, but bs is not preserving state, and instead does a full refresh. This is not very useful. It seems bs no longer supports true injection. I <a href="https://github.com/BrowserSync/browser-sync/issues/951" rel="noreferrer">filed an issue on GH</a> if you want to contribute.</p>
  
  <p>Here is the pertinent code:</p>
  
  <pre><code>// styles:dev task    
  gulp.task('styles:dev', function() {
      return gulp.src(config.src)
          .pipe(sourcemaps.init())
          .pipe(postcss(config.postcss.dev))
          .pipe(sourcemaps.write('.'))
          .pipe(gulp.dest(config.dest.dev))
          .pipe(browserSync.stream());
  });
  
  // browserSync task    
  gulp.task('browserSync', function(cb) {
      browserSync.init(config, cb);
  });
  
  // Watch task:
  gulp.task('watch:styles', function() {
      return gulp.watch(config.paths.css,
          gulp.series('styles:dev'));
  });
  
  gulp.task('watch', gulp.parallel('watch:styles'));
  
  // default task    
  gulp.task('default',
      gulp.series('clean:dev',
          gulp.parallel('copy:dev', 'styles:dev'), 'browserSync', 'watch')
  );
  </code></pre>
  
  <p>Thanks in advance.</p>