Hey everyone, I have a bit of a silly question that's more of a sanity check. Do I actually need to have any Tailwind files present in my live environment? I mean, since Tailwind essentially acts as a CSS compiler, can I just run it on my staging environment to build the styles and then upload the compiled CSS to the live server alongside the HTML? This way, I can avoid the overhead of installing Tailwind on the live server unless I plan to compile CSS or make changes directly in the future.
2 Answers
Yes, you can definitely do that! Tailwind compiles into a CSS file that you can easily share between environments. But honestly, I’m not sure why you would want to skip using it in production. Tailwind isn’t that heavy on resources, so it might be better to let it do its job during your production build.
I don’t think you really need Tailwind on the live server. If your site must generate various styles for colors or sizes dynamically, you might just stick to inline CSS instead. Typically, Tailwind’s generated CSS doesn’t change much, so if you make an update, users will have to re-download everything, rather than using cached versions. Maybe keep it for production, but not strictly for live?

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads