For some reason my tailwind css classes do not apply without running the 'npm run build-css' command
Hi, for some reason my tailwindcss classes do not automatically apply after saving on a live server without running the command 'npm run build-css'.
Could anyone please help me? I would greatly appreciate it
7 Replies
tailwind strips unused classes out during that build step, so if you use any new ones, you need to rebuild the styles.css in public
if you use a properly set up vite devserver instead of the liveserver component, then that can watch your source files and automatically rebuild styles.css for you whenever you change and save anything
Install Tailwind CSS with Vite - Tailwind CSS
Setting up Tailwind CSS in a Vite project.
so with this current project i cant do anything to fix this? So i would need to always do the npm run command right?
you could add vite into your current project
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
you can totally use vite on an otherwise vanilla project too though
okay, thank you so much
oooo thank you