-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat(nuxt): add dedicated #teleports
element for ssr teleports
#25043
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
|
Marking as draft just for triage. Just let me know when it's good to go π |
β Live Preview ready!
|
dd2e305
to
b7b52e0
Compare
Good to go π |
@@ -225,8 +226,16 @@ async function getIslandContext (event: H3Event): Promise<NuxtIslandContext> { | |||
return ctx | |||
} | |||
|
|||
const HAS_APP_TELEPORTS = appTeleportTag && appTeleportId |
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.
It would be worth checking whether this (and anything dependent on it) correctly tree-shakes when appTeleportId
is unset, if you haven't already.
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.
Looking good to me! I've left a few tiny comments for your consideration.
I think we can go ahead with docs β€οΈ
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.
Thank you β€οΈ
Made a few changes to reduce API change. Let me know if you think it was better before π
#teleports
element for ssr teleports
@danielroe Great improvements π |
π Linked issue
Resolves #24207
Resolves #25041
β Type of change
π Description
Right now we prepend SSR teleports to the body. This doesn't align with Vue's client-side appending behavior.
This PR introduces a dedicated app-level teleport element as possible target for SSR (and also client-side) teleports to give an alternative and also align with Evan's recommendation
Tasks
π Checklist