fix(ssr): resolve nested async teleport content#9431
Conversation
Size ReportBundles
Usages
|
|
this would also resolve nuxt/nuxt#35427 @edison1105 I came up with a couple of extra tests if that would be helpful in getting this merged 🙏 |
|
@danielroe will be merged soon. |
📝 WalkthroughWalkthroughSSR teleport handling now marks async teleport buffers and resolves them directly. A new SSR test covers Teleport with Suspense around an async component and checks the rendered teleport output. ChangesSSR teleport with Suspense
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
@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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/server-renderer/__tests__/ssrTeleport.spec.ts`:
- Around line 220-222: The teleport target assertion in ssrTeleport.spec.ts is
missing the leading `<!--teleport start anchor-->` marker. Update the expected
value in the `ssrRenderTeleport` test to match the enabled teleport wrapping
produced by `ssrRenderTeleport`, using the existing `ctx.teleports['`#target`']`
assertion as the location to fix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0f30626d-5800-4951-aba6-fe6a84a3205f
📒 Files selected for processing (2)
packages/server-renderer/__tests__/ssrTeleport.spec.tspackages/server-renderer/src/renderToString.ts
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
close #6207
the root cause is that
targetBuffermay be a two-dimensional array.core/packages/server-renderer/src/helpers/ssrRenderTeleport.ts
Lines 28 to 36 in 0a8be45
Summary by CodeRabbit
Suspenseand async components, ensuring correct teleport marker-only output where appropriate and correct resolved HTML placement.Teleport+Suspenseresolves correctly inrenderToString.