-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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): call hotUpdate
hook with file create/delete
#16249
feat(hmr): call hotUpdate
hook with file create/delete
#16249
Conversation
Run & review this pull request in StackBlitz Codeflow. |
This is great! I needed to modify |
It seems they want I'll make a new PR without the last commit (1bbaa6f) and cherry-pick the last commit on top of |
1bbaa6f
to
f1ecdb4
Compare
hotUpdate
hook with file create/delete
hotUpdate
hook with file create/deletehotUpdate
hook with file create/delete
The test failure is same with #16129 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for rebasing the PR!
Description
The import.meta.glob plugin was using
server._importGlobMap
. If thehandleHotUpdate
hook runs on file create/delete, that variable can be moved inside the plugin by using that hook.This PR is mostly a refactor but it changes two behaviors.
/foo.html
andfoo.html
is created or deleted, a reload will happen)_runHandleHotUpdateOnCreateAndDelete: true
,handleHMRUpdate
hook will be called forcreate
/delete
events.HmrContext
type now hastype: 'create' | 'delete' | 'update'
. I added the new property to keep backward compatibility, but maybe we can just call it for all plugins.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).