vite icon indicating copy to clipboard operation
vite copied to clipboard

Reload does not happen if an entrypoint is in a circular dep loop

Open alexandermake opened this issue 1 year ago • 5 comments

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

alexandermake avatar May 13 '24 06:05 alexandermake

The link is not a repro: https://antfu.me/posts/why-reproductions-are-required#reproducible-projects-or-playgrounds

bluwy avatar May 13 '24 07:05 bluwy

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.

github-actions[bot] avatar May 13 '24 07:05 github-actions[bot]

Here is it link

alexandermake avatar May 13 '24 08:05 alexandermake

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.

sapphi-red avatar May 17 '24 05:05 sapphi-red

Seems to be related to https://github.com/vitejs/vite/pull/15585

bluwy avatar May 17 '24 06:05 bluwy