Skip to content

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

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
@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.

2 participants