I’ve setup my environment using fresh installs of the latest versions of Trellis, Bedrock, and Sage. When running
yarn start, CSS changes are detected without a problem and updated within the browser but any change to a .php file is ignored. Manually reloading the browser shows my changes.
After viewing older topics on the subject, I’ve tried to make sure my config.json is correct:
I’m a bit stumped as to why the CSS refreshing works great but .php files don’t trigger a reload/injection.
It’s only watching PHP files in these directories:
You can add more directories if you’re editing PHP files elsewhere. File watching can also be a little variable based on the OS. What is your development environment?
Thanks for the reply!
I’m on macOS Mojave and I’m getting the issue when trying to edit PHP files within those directories.
Any more info on your local dev setup? (Vagrant box? Docker? Valet?)
I’m using Vagrant with Trellis (and Bedrock/Sage if helpful). My dev environment setup essentially followed the documentation verbatim.
bs-html-injector is buggy and abandoned, and the developer experience is not consistent for everyone. Some people don’t have issues, other people do We’re not using this package anymore in the next version of Sage.
You can remove it from your theme dependencies and the build process will still work… just without injection
If your local dev has HTTPS enabled, you could also try disabling SSL and seeing if injection works.
Ah I see, that’s unfortunate about the package! Thanks for taking the time to look into it. I’m eagerly awaiting the next version of Sage
This topic was automatically closed after 42 days. New replies are no longer allowed.