CSS classes are not working with Vite + React + SWC #17240
Unanswered
yashparekh-42cs
asked this question in
Help
Replies: 1 comment 4 replies
-
Consider checking:
Otherwise, consider providing a git repo that reproduces the unexpected behavior. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I followed below command for vite installation and then selected React as framework and Javascript+SWC as variant.
npm create vite@latest
Then after I executed the command "npm install" for dependencies and started the development server using "npm run dev"
Till here everything works fine. Now I want to install Tailwind v4 in this Vite project so I followed this steps.
https://tailwindcss.com/docs/installation/using-vite
After doing all this, when I tried to use just a normal tailwind class "h-full w-full ...", it doesn't reflects anything. The network tab shows that index.css loaded successfully and even there is no errors in console but don't know why tailwind classes are not working.
Please suggest me some way. Attaching few files for reference.
package.json
vite.config.js
Node version - 20.18.2
NPM version - 10.8.2
Beta Was this translation helpful? Give feedback.
All reactions