I have a site running on localhost (with Docker), and I use Browsersync to automatically refresh and inject pages upon save.
This works fine for php files and normal link/script tags, but Browsersync does not inject changes made to css and js files if they are applied with Kirby’s helper functions. Notice that, the files are updated inside Kirby’s folders, but are not injected on the browser.
The Browsersync command in my npm scripts file is: "serve": "browser-sync start --proxy localhost --files public --no-notify"
Maybe the problem is that helpers create urls that Browsersync is not watching, like the <link href="//localhost:3000/assets/main.css"> I am getting, vs the <link href="assets/main.css"> I used if I hand-coded the <link>.
I have no problem using live reloading so far.
As far as I can see you just set public for the --files config.
In my case I added all files that should be watched.