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
Jochem
Jochem2y ago
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
ian
ianOP2y ago
so with this current project i cant do anything to fix this? So i would need to always do the npm run command right?
Jochem
Jochem2y ago
you could add vite into your current project
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochem2y ago
you can totally use vite on an otherwise vanilla project too though
ian
ianOP2y ago
okay, thank you so much oooo thank you
Want results from more Discord servers?
Add your server