Live Reload in Production

:information_source: Summary Bring back CSS reloads in production
:hammer_and_wrench: Repository https://github.com/communiteq/discourse-tc-livereload
:question: Install Guide How to install a theme or theme component

Install this theme component

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 :face_with_open_eyes_and_hand_over_mouth:

6 Likes

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).

Thanks very much!

1 Like

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.

2 Likes

Nice!

Aha. Maybe it’s good to force a hack like me to get better hints, then. I’m often at a loss at what’s gone wrong. Maybe this is why!

But for simple CSS and color tweaks, there’s probably no danger, I’d imagine.