[v4] Vite duplicating index.css on hot reload after Tailwind CSS update #16318
-
After upgrading Tailwind CSS to version 4, my Vite project is unexpectedly logging multiple instances of Has anyone else encountered this? Could this be a known issue with Tailwind 4, or is it potentially related to how Vite processes CSS files on this new update? 🧐 Steps to Reproduce
npm install -D tailwindcss@latest vite@latest
npm run dev
Troubleshooting AttemptsI have attempted the following steps to identify the cause of the issue:
I also modified the content paths in |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
@alex-x-x-x-x Hey! Are you using |
Beta Was this translation helpful? Give feedback.
-
node_modules/@tailwindcss/node/dist/index.mjs function I(s){if(s.includes("/.vite/"))return;let n=(V(s)==="css"||s.includes("&lang.css")||s.match(K))&&!z.test(s)&&!J.test(s);return n&&console.log(n),n} temporarly fix for me is just remove console.log and extra n: function I(s){if(s.includes("/.vite/"))return;let n=(V(s)==="css"||s.includes("&lang.css")||s.match(K))&&!z.test(s)&&!J.test(s);return n} |
Beta Was this translation helpful? Give feedback.
-
This should now be fixed in |
Beta Was this translation helpful? Give feedback.
This should now be fixed in
v4.0.5
.