-
Notifications
You must be signed in to change notification settings - Fork 53
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
Setting resolve.conditions
causes Vite dev server run into infinite loop
#171
Comments
Which Vite version is this? 5 or 6 |
Vite 6.0.7 |
@guyutongxue can you check if the fix here works, with i.e. pnpm link? steps: clone, pnpm i, pnpm build, and then from your repo |
Yes, confirmed that #173 will fix my issue. |
I can confirm it too in this stackblitz https://stackblitz.com/edit/vitejs-vite-1k7n1gjp?file=src%2FApp.jsx |
When setting
vite.config.js
as following:And following files including circular import:
Then the hot reload of dev server will make Vite run into infinite loops:
01:14:18 [vite] (client) hmr update /src/App.jsx 01:14:18 [vite] (client) hmr invalidate /src/App.jsx 01:14:18 [vite] (client) hmr update /src/App.jsx 01:14:18 [vite] (client) hmr invalidate /src/App.jsx 01:14:18 [vite] (client) hmr update /src/App.jsx 01:14:18 [vite] (client) hmr invalidate /src/App.jsx 01:14:18 [vite] (client) hmr update /src/App.jsx 01:14:18 [vite] (client) hmr invalidate /src/App.jsx 01:14:18 [vite] (client) hmr update /src/App.jsx 01:14:18 [vite] (client) hmr invalidate /src/App.jsx # [ continuing ... ]
Reproducible playground
StackBlitz
Step to reproduce:
src/main.js
content and save. That's it, bug occurs.The text was updated successfully, but these errors were encountered: