Reload does not happen if an entrypoint is in a circular dep loop
Describe the bug
In the repo, after change any part of source code, hmr do not refresh the page.
Reproduction
https://github.com/alexandermake/puzzling-potions
Steps to reproduce
npm install npm run start
System Info
System:
OS: macOS 14.4.1
CPU: (11) arm64 Apple M3 Pro
Memory: 1.98 GB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.1 - ~/.nvm/versions/node/v20.12.1/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.1/bin/npm
Browsers:
Chrome: 124.0.6367.158
Safari: 17.4.1
npmPackages:
vite: ^5.2.2 => 5.2.2
Used Package Manager
npm
Logs
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
The link is not a repro: https://antfu.me/posts/why-reproductions-are-required#reproducible-projects-or-playgrounds
Hello @alexandermake. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.
Here is it link
Trimmed down repro: https://stackblitz.com/edit/vitejs-vite-lnwjz8?file=main.js&terminal=dev It seems the reload doesn't happen if the entry is in a circular dep loop.
Seems to be related to https://github.com/vitejs/vite/pull/15585