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(vite-node): moduleCache.invalidateDepTree utiltity #1872

Merged
merged 2 commits into from Aug 18, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented Aug 18, 2022

This allows invalidating the tree from branches to the root, and leaving untouched branches to stay in cache.

In Vite's client, the HMR happens up to the closest HMR boundary (usually a dynamic import entry) and leaves the root entry untouched. While in Vite-Node, if we execute the same root entries multiple times, it will skip its branch evaluation. So in order to invalidate a nested branch module correctly, we need to invalidate all its importers down to the root.

@antfu antfu merged commit b8922aa into main Aug 18, 2022
@antfu antfu deleted the feat/vite-node-importee branch August 18, 2022 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant