-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(hydration): also set vShow name if __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__ flag is enabled #13777
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
…TCH_DETAILS__ flag is enabled
WalkthroughThe vShow directive’s name assignment is now gated by (DEV || FEATURE_PROD_HYDRATION_MISMATCH_DETAILS), ensuring vShow.name = 'show' in development and when the production hydration mismatch details feature is enabled. No other logic or exports were modified. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
@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: |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/runtime-dom/src/directives/vShow.ts (1)
48-50
: Clarify vShow.name guard and verify feature flag declaration
- The
__FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__
macro is declared inpackages/global.d.ts
.- No other directives in
packages/runtime-dom/src/directives/
assign.name
, so no additional guards are needed.Optional: add an explanatory comment before the guard to document why we expose the directive name in production mismatch logs:
packages/runtime-dom/src/directives/vShow.ts @@ - if (__DEV__ || __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__) { + // Expose directive name when hydration mismatch details are enabled in prod + // so hydration errors can reference "v-show" explicitly. + if (__DEV__ || __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__) { vShow.name = 'show' }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/runtime-dom/src/directives/vShow.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Redirect rules
- GitHub Check: Header rules
- GitHub Check: continuous-release
- GitHub Check: Pages changed
🔇 Additional comments (1)
packages/runtime-dom/src/directives/vShow.ts (1)
48-50
: LGTM: correctly gate vShow.name for prod hydration mismatch detailsSetting
vShow.name
when__DEV__ || __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__
is true aligns with how other diagnostics are exposed and should unblock richer mismatch messaging in flagged prod builds without affecting normal prod bundles. No runtime behavior changes to v-show itself.
Size ReportBundles
Usages
|
) close vuejs#13805 re-fix vuejs#13744 revert vuejs#13777 The implementation in vuejs#13777 requires users to configure __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__, otherwise errors like vuejs#13805 will occur.
close #13744
Summary by CodeRabbit