mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix payload for nuxt2
This commit is contained in:
parent
55819d52e0
commit
a8db45a8ba
@ -28,7 +28,7 @@ export async function render (url, ctx: any) {
|
|||||||
}
|
}
|
||||||
const rendered = await renderer.renderToString(ssrContext)
|
const rendered = await renderer.renderToString(ssrContext)
|
||||||
|
|
||||||
const state = `<script>window.__NUXT__ = ${devalue(ssrContext.payload)}</script>`
|
const state = `<script>window.__NUXT__=${devalue(ssrContext.nuxt /* nuxt 2 */ || ssrContext.payload /* nuxt 3 */)}</script>`
|
||||||
const _html = `<div id="__nuxt">${rendered.html}</div>`
|
const _html = `<div id="__nuxt">${rendered.html}</div>`
|
||||||
|
|
||||||
const html = htmlTemplate({
|
const html = htmlTemplate({
|
||||||
|
Loading…
Reference in New Issue
Block a user