-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
fix(hmr): avoid hydration for hmr root reload #12450
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
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.
This also fixes vitejs/vite-plugin-vue#525 Screen.Recording.2025-02-15.at.14.40.21.movcreate-vite-extra/template-ssr-vue example, before (see issue) and after see screencast |
Caution Review failedThe pull request is closed. WalkthroughA new SSR hydration test for Hot Module Replacement (HMR) root reload has been added, verifying that the root component can be reloaded and updated correctly. The HMR reload logic in the app mounting process has been modified to ensure the vnode's DOM element reference is cleared, preventing unwanted hydration during HMR updates. Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Case
participant App as App Instance
participant HMR as HMR Runtime
Test->>App: Mount SSR-hydrated component
App->>Test: DOM contains <div>foo</div>
Test->>HMR: Call reload with new component
HMR->>App: Replace root vnode, set el = null, render
App->>Test: DOM updates to <div>bar</div>
Assessment against linked issues
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
close vitejs/vite-plugin-vue#146
close vitejs/vite-plugin-vue#477
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes