fix(hydration): update hydration mismatch checks for asset URL SSR/CSR differences#14377
fix(hydration): update hydration mismatch checks for asset URL SSR/CSR differences#14377edison1105 wants to merge 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThis PR adds asset URL-aware comparison logic to SSR hydration mismatch detection. It introduces helper functions to compare asset URLs, handle srcset attributes, and detect asset URL attributes. When hydration mismatches occur on asset URLs and a feature flag is enabled, URLs are compared intelligently to avoid false positives from relative/absolute URL differences. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Comment |
Size ReportBundles
Usages
|
@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: |
close #14370
SSR/CSR differences because
import.meta.urlhas different semantics in browsers vs. Node.js. The server bundle also cannot determine the client host URL ahead of time.https://vite.dev/guide/assets#new-url-url-import-meta-url
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.