Skip to content

feat(hmr): invalidate message#10946

Merged
patak-cat merged 2 commits intovitejs:mainfrom
ArnaudBarre:hmr-invalidate-reason
Nov 17, 2022
Merged

feat(hmr): invalidate message#10946
patak-cat merged 2 commits intovitejs:mainfrom
ArnaudBarre:hmr-invalidate-reason

Conversation

@ArnaudBarre
Copy link
Member

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

@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-cat patak-cat 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

Labels

p2-to-be-discussed Enhancement under consideration (priority)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants