I’m having an issue with css not updating on a child site. The rest of browsersync works ie. page reloads when .php changes are made. I see the css changes when I refresh my local dev url.
I’m using Sage (without Bedrock) on top of our custom Vagrant env. Not Trellis
Has anyone seen this issue?
So now manually refreshing isn’t working either. I have to run
gulp --production every single time I make a change. Surely that isn’t right.
The new Sage build process is a bit of rabbit hole for me atm so I’m not sure where to start poking around. Please help.
I notice Sage is insisting on loading
main-xxxxxxxxxx.css instead of
main.css. Isn’t that set as an environment global somewhere?
Ok, I didn’t know having run
gulp --production even once changed the environment. Running
gulp fixed that. Turns out I had I had
define('WP_ENV', 'development'); in my
wp-config.php I wouldn’t have had to re-run
gulp. Yay knowledge.
Still, I’m back to my original question to why browsersync simply wont update the css. I’m getting the css injection messages from BS but my changes aren’t actually showing. Even refreshing
localhost:3000 doesn’t help. I can only see changes at my local dev url. Starting to miss grunt/livereload atm.
It doesn’t change the environment. It does append the random numbers/letters for cache busting.
I’m venturing a guess, but have you stopped
gulp watch since running
gulp? What I generally do is run
gulp && gulp watch, that makes sure the latest css/js has been built, and makes sure the revved files are removed, if for instance I have deployed and
gulp --production was run.
Otherwise, I don’t know specifically what the issue would be. Can you try a stock Sage install on a regular WP site, then on multisite? I haven’t heard of issues using multisite with Sage but it could be possible.
Thanks for the reply. Good tip on running
gulp && gulp watch.
You’re right in that the logical thing to do would be ensure this is specifically a multisite issue. Just seems odd that BS would actually be communicating but fail to do the actual injection.