Manually installed Tailwind and it is not working.
What has been done?
checking the config files
tailwind.config.js - content added ["./src/*/.{html,js}"]
Testing text color - not working
Research:
gpt
create postcss.config.js
npm install tailwindcss postcss autoprefixer
npx tailwindcss init
add CSS to index.css
import CSS in main.tsx
stackoverflow
update your vite.config file
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from 'tailwindcss'
export default defineConfig({
plugins: [react()],
css: {
postcss: {
plugins: [tailwindcss()],
},
}
})
After following the guides from the official [documentation]
(https://tailwindcss.com/docs/installation), you may want to check in your package.json
file and see under the devDependencies if tailwind is appearing there or not. Also, check
in your postcss.config.cjs file and see if the following is there:
Still not working but configs seem all right
![In my case the problem came from tailwind.config.js, index.html was missing from the content.]https://stackoverflow.com/a/78663634/16779281
Manually installed Tailwind and it is not working.
What has been done?
Research: gpt
npm install tailwindcss postcss autoprefixer
npx tailwindcss init
main.tsx
stackoverflowupdate your vite.config file
after installed tailwindcss and postcss, generate config files for both of them with the following command
Still not working but configs seem all right ![In my case the problem came from tailwind.config.js, index.html was missing from the content.]https://stackoverflow.com/a/78663634/16779281
Found the issue Did not add jsx and TSX to the content