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: handle HMR for files with more than one glob import #3497

Merged
merged 1 commit into from
May 21, 2021

Conversation

brillout
Copy link
Contributor

@brillout brillout commented May 20, 2021

This PR fixes HMR when a file has more than one glob import.

This is the case for vite-plugin-ssr and is a root cause for vikejs/vike#66.

This fixes #3496.

@Shinigami92 Shinigami92 added feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority) labels May 20, 2021
Shinigami92
Shinigami92 previously approved these changes May 20, 2021
@Schniz
Copy link

Schniz commented May 20, 2021

I was just thinking about it because I had the same issue. One could use +(OLD_PATTERN|NEW_PATTERN) but supporting multiple patterns is much preferable. Nice 😃

@brillout
Copy link
Contributor Author

@Schniz :-). I'm super looking forward to have this as well; can't wait to have perfect SSR HMR hehe.

@brillout
Copy link
Contributor Author

I merely rebased; @Shinigami92's approval should still hold.

@patak-dev patak-dev changed the title fix: properly handle HMR for files with more than one glob import fix: handle HMR for files with more than one glob import May 21, 2021
@patak-dev patak-dev merged commit 05bd96e into vitejs:main May 21, 2021
@patak-dev
Copy link
Member

Thanks for digging into these issues and improving Vite's HMR for everybody @brillout ❤️

fi3ework pushed a commit to fi3ework/vite that referenced this pull request May 22, 2021
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.

Vite's HMR fails when a file has more than one glob import.
4 participants