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

fix(hmr): multiple updates happened when invalidate is called while multiple tabs open #16307

Merged
merged 1 commit into from Mar 29, 2024

Conversation

sapphi-red
Copy link
Member

Description

While checking the flaky test I found this bug 🫠

Because import.meta.hot.invalidate is called from the browser side, if multiple tabs are open, multiple import.meta.hot.invalidate request is sent to server causing multiple updates.

Copy link

stackblitz bot commented Mar 29, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority) labels Mar 29, 2024
@patak-dev
Copy link
Member

Oh, this is a very interesting one. Incredible there are still these kind of issues in Vite's HMR after all these years 🤯

@patak-dev
Copy link
Member

/ecosystem-ci run

@patak-dev patak-dev merged commit 21cc10b into vitejs:main Mar 29, 2024
10 checks passed
@sapphi-red sapphi-red deleted the fix/hmr-multiple-tabs-invalidate branch March 30, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants