I was starting my Vite React project. And as the next step I configured TailwindCSS as per Vite React documentation. Then I got this error message which targets the index.css
file. The file only contained Tailwind CSS imports. How to solve this issue?
/* index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
Error messages:
- Unknown at rule @tailwind
- Unknown at rule @tailwind
- Unknown at rule @tailwind
I tried searching in the internet & connected some of my colleages. And they suggested me to retry the installation configuration or to ignore the error.
2
Answers
index.css
When I install Tailwind CSS with Vite, I add the @tailwind directives for each of Tailwind’s layers in my ./src/index.css file. Like this,
but i was getting the error messages
So, I change the file configuration of the index.css using this
And the problem/error get solved, the vite project is running without any issues.