Skip to content

SSR teleports don't work with Suspense #6207

Open
@danielroe

Description

@danielroe

Vue version

3.2.37

Link to minimal reproduction

https://stackblitz.com/edit/github-kqkhhq

Steps to reproduce

The following code is sufficient to reproduce the bug:

<Teleport to="#async">
  <Suspense>
    <SomeAsyncComponent />
  </Suspense>
</Teleport>

In the reproduction sandbox, you can see that on client-side this behaves correctly (and would hydrate HTML that rendered correctly), and also that this behaves fine on SSR with a sync component.

Note that the same behaviour is displayed if suspense is lifted higher (some nodes higher than teleport) or is nested deeper within the teleport.

What is expected?

It's expected that the async component will render into the teleport on SSR.

What is actually happening?

Instead, all that is rendered is the teleport anchor.

System Info

Stackblitz.

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions