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

feat(hmr): invalidate message #10946

merged 2 commits into from
Nov 17, 2022

feat(hmr): invalidate message #10946

merged 2 commits into from
Nov 17, 2022


Copy link

@ArnaudBarre ArnaudBarre commented Nov 16, 2022

This would be helpful for building hmr invalidation for vite-plugin-swc-react-refresh. WIP on this branch

Should we always add a console log?

In this first implementation, I'm always skipping clear for the next hmr log so that's more visible that two updates happened.

Screenshot 2022-11-16 at 01 22 21

Screenshot 2022-11-16 at 01 39 00

cc @IanVS @patak-dev

Note: After looking closer at the metro implementation, I found that I would need to get access to the previous module in the accept callback to get a complete implementation for refresh boundary check.

docs/guide/ Outdated Show resolved Hide resolved
@bluwy bluwy added the p2-to-be-discussed Enhancement under consideration (priority) label Nov 16, 2022
@ArnaudBarre ArnaudBarre changed the title feat(hmr): invalidate reason feat(hmr): invalidate message Nov 17, 2022
@patak-dev patak-dev merged commit 0d73473 into vitejs:main Nov 17, 2022
@ArnaudBarre ArnaudBarre deleted the hmr-invalidate-reason branch November 18, 2022 09:01
fc pushed a commit to fc/vite that referenced this pull request Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
p2-to-be-discussed Enhancement under consideration (priority)
Archived in project

Successfully merging this pull request may close these issues.

None yet

3 participants