Skip to content
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

HMR infinite loop inside deepEqual #400

Open
8 of 9 tasks
aguingand opened this issue May 6, 2024 · 3 comments
Open
8 of 9 tasks

HMR infinite loop inside deepEqual #400

aguingand opened this issue May 6, 2024 · 3 comments
Labels
p3-significant 🔨 High priority enhancement (priority)

Comments

@aguingand
Copy link

aguingand commented May 6, 2024

Related plugins

Describe the bug

I can reproduce an infinite loop during HMR. I have located the loop inside deepEqual function introduced in (#258 and #334). It seems to appear when importing third-party library (here radix-vue / vue) because it recursively walk through the AST of the library components / TS definitions (non-project file).

Related issue #350.

Reproduction

https://stackblitz.com/edit/vite-plugin-vue-hmr-inifite-loop-repro

Steps to reproduce

  • Edit src/App.vue HMR works
  • Edit src/components/ui/alert-dialog/AlertDialog.vue HMR hangs

System Info

System:
    OS: macOS 12.7.4
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 1.88 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 8.15.8 - ~/.nvm/versions/node/v20.12.2/bin/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^5.0.4 => 5.0.4
    vite: ^5.2.11 => 5.2.11

Used Package Manager

npm

Logs

No response

Validations

@aguingand
Copy link
Author

I've updated system infos, it occurs in latest version (5.0.4). Version 4.6.2 is not affected.

@elliots
Copy link

elliots commented May 12, 2024

I'm seeing this in our project too
image

@sxzz
Copy link
Member

sxzz commented May 12, 2024

/cc @sodatea

@sodatea sodatea added the p3-significant 🔨 High priority enhancement (priority) label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-significant 🔨 High priority enhancement (priority)
Projects
None yet
Development

No branches or pull requests

4 participants