Browsersync-webpack-plugin is abandoned. Migrate to browser-sync-webpack-plugin or webpack-dev-server?

Sage 9 includes browsersync-webpack-plugin as a dependency, but the repo is abandoned. It’s also poorly documented.

I’m having an issue where I’ve got multiple css files being compiled, but Browsersync is only injecting changes to main.css. Noticing the abandoned repo, I decided to attempt a migration to browser-sync-webpack-plugin which – though it hasn’t had a ton of recent updates – isn’t officially abandoned and has more documentation. I got it somewhat working, but couldn’t get it to inject CSS at all, just reloading every time.

A bit of further digging seems to indicate that momentum is moving away from Browsersync and over to webpack-dev-server, and that it should be possible to inject css using css-hot-loader.

Anyone succeed on moving Sage over to a different live reloading plugin?

4 Likes