-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
fix(runtime-core): inherit comment nodes during block patch in production build #10748
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
❌ Deploy Preview for vue-sfc-playground failed.
|
❌ Deploy Preview for vue-next-template-explorer failed.
|
46f6f3b
to
8e82e54
Compare
@edison1105 I think assuming that all comments should be removed in production mode, then there shouldn't create vnodes for comments in production mode for performance reason. However, comment vnodes are created, also removed by nodeOpt.remove method during unmounting, except for traversStaticChildren, which lacks consistency. Indeed this inconsistency in handling caused the exception. |
@tonliver Could you add a test case? |
Sure, I'll work on it as soon as possible. |
Size ReportBundles
Usages
|
@edison1105 I've added some test cases. |
@edison1105 What else can I do? |
@yyx990803 What else can I do? |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
""" WalkthroughThe changes add new test cases to the Teleport component's test suite, specifically targeting scenarios with comment nodes as teleport children. Additionally, the renderer logic for handling comment vnode Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Teleport Test Suite
participant Renderer as Renderer
participant DOM as DOM
Test->>Renderer: Mount teleport with comment node
Renderer->>DOM: Insert comment node into teleport target
Test->>Renderer: Trigger reactive update
Renderer->>DOM: Ensure comment node instance is preserved
Test->>Renderer: Unmount teleport
Renderer->>DOM: Remove comment node from DOM
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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 #10747
close #12650
Summary by CodeRabbit