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
Jochem17mo 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
ian17mo 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
Jochem17mo ago
you could add vite into your current project
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochem17mo ago
you can totally use vite on an otherwise vanilla project too though
ian
ian17mo ago
okay, thank you so much oooo thank you