-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite:hmr circular imports detected: /src/index.css -> /src/main.jsx -> /src/index.css #15221
Comments
Start a new pull request in StackBlitz Codeflow. |
It’s unbelievable that such simple code doesn’t support |
Just kidding, maybe the unborn |
@Nefcanto did you solve this issue I am also facing the unnecessary circular dependencies due to using tailwind in .css filees |
@MuhammadHamzaChippa nope. We just suffer from a full reload for each character that we change in our source code. Vite is becoming a pain in the ass. |
I have just migrated my enterprise application from CRA to Vite and it was a terrible experience both with the paths and using tailwind. Are you planning to go back to CRA ? |
@MuhammadHamzaChippa never. For us, CRA would take more than 70 seconds just to compile. Vite compiles in less than 500 milliseconds. We will never go back to CRA. But we're stuck at this Vite problem now. |
Then simply stop using tailwind in css files this is the only solution to avoid page reload. Am I right? |
@MuhammadHamzaChippa , then what should we do? What are the other options? |
Use ordinary css i guess |
Describe the bug
This dependency chain needs to be more specific.
I'm finding cyclic dependencies of my vite-react project using
--debug hmr
flag, which works exceptionally well for other dependencies.However, now I'm stuck on this one. It says
/src/index.css
uses/src/main.jsx
which I don't understand.I'm using Tailwind, and this is the content of my
index.css
file:I can't find out why and how this file uses
main.jsx
.I also tried to create a reproduction, but I failed. I'll send the reproduction attempt, though.
Reproduction
https://stackblitz.com/edit/vitejs-vite-rf8vvv?file=src%2FApp.jsx,src%2Findex.css,src%2Fmain.jsx&terminal=dev
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: