-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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(server): invalidate module with hmr #10333
Conversation
I think that it may be confusing that
We should probably follow the current convention in the module graph and pass a module instead. What about |
I also updated to a |
This PR would make my i18next resources HMR desperately easy (if I have the correct understanding). Invalidating my virtual module should cause all the relative i18next resource to refresh. Aside from this, it looks like a detailed mess (outside of the vite ecosystem) to invalidate old resources and load new. |
Thanks for your feedback @rosskevin, it's very helpful to know real use cases for PRs 🙏🏼 |
Description
Fix #6871
New API:
server.reloadModule
that invalidates a module with hmr, unlikemoduleGraph.invalidateModule
Additional context
Question:
string
vs aModuleNode
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).