In August, live CSS reload was removed in production.
Now I use my development environment for plugins, but most of the time I develop theme components on a staging server, which is technically production, but it has only people that understand to F5 when they see odd things happening.
I have created this theme component to bring back live reload on non-development environments.
Because it can indeed cause issues (which was the reason it was taken away) the functionality can be limited to specific group(s). Default is staff. The group(s) can be changed in the theme component settings.
Still, it is not recommended to use this theme component if you don’t know what you’re doing
Hooray! I would love to have this move to core and apply only to admins, or be disabled by default and force people to add a group to have it apply to.
I was doing pretty much all of my theme development on production sites (though usually a staging techincally-production site).
As long as there’s an appropriate disclaimer in the description, a new group-based site setting in core sounds fine. pr-welcome
I’d still strongly recommend against developing on a production instance as a day-to-day thing. Tons of useful errors & debug information is stripped out of production builds, so you won’t get useful feedback when things go wrong.
Yeah from a debugging point of view, there isn’t much difference between dev/prod for CSS files.
But going back to the ‘live reload’ problem - that is CSS-specific. If stylesheets from a newer version of Discourse are inserted into a page running an older version of Discourse, that is likely to cause surprising issues for end-users.
That’s why we updated things so that the CSS update is deferred until the next page navigation, so it now lines up with the JS updates.