Subscribe on changes!

[SSR] Render Teleports Distinctly e.g. renderToContext()

avatar
Nov 8th 2020

What problem does this feature solve?

Currently, SSR only explicitly supports rendering the "body" of a Vue application via renderToString... However in some cases, teleport is being used to solve issues with "out of Vue" issues like setting metatags.

Here is an example: https://github.com/nuxt/vue-meta/issues/558#issuecomment-718823772

In working with Vue/Vite to create some standard pre-rendered templates, all is working well except there is no way to render the <head> teleports for meta.

What does the proposed API look like?

const {result, context} = renderToContext(app)

avatar
May 18th 2022

Closing as stale