feat: add hook for getting data before sending to client

This commit is contained in:
Clark Du 2018-05-03 20:47:55 +01:00
parent 6494818a5d
commit 7514db73b2
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -353,6 +353,8 @@ export default class Renderer {
HEAD += context.renderResourceHints()
}
await this.nuxt.callHook('render:context', context.nuxt)
const serializedSession = `window.__NUXT__=${serialize(context.nuxt, {
isJSON: true
})};`