TailwindCSS has just released its new v4 version , so all the older v3 documentation has become outdated. this new guide line to add tailwind into vite+react app. guided url link
https://tailwindcss.com/docs/installation/using-vite