-
Notifications
You must be signed in to change notification settings - Fork 4
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
a non-fast-refresh update doesn't cause a cell reload #12
Comments
Vite's HMR propagates changes bottom up. If a change is accepted by a module along the way then propagation stops; otherwise a full reload happens when propagation gets to the root of the dependency tree. This scheme doesn't account for multiply-rooted trees (e.g. multiple cells with independent dependencies), so if a change propagates to a root it sends a full reload message to all views. To handle this correctly we need to pass the affected roots in reload messages, and check in the message handler for a view that it's one of the affected roots. (I recall this being tricky because the handler is generic and doesn't have access to the root; it has the window URL but the dependency graph doesn't connect the Javascript root module with the window URL.) |
In 6738918 I made it so there's not a full-page reload for a client-side cell whenever an unrelated cell changes; but this breaks full-page reloads that are actually needed (e.g. if you change the exports of a cell).
The text was updated successfully, but these errors were encountered: