From 7514db73b25c23b8c14ebdafbb4e129ac282aabd Mon Sep 17 00:00:00 2001 From: Clark Du Date: Thu, 3 May 2018 20:47:55 +0100 Subject: [PATCH] feat: add hook for getting data before sending to client --- lib/core/renderer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core/renderer.js b/lib/core/renderer.js index 5332371f21..5bb3f40cf0 100644 --- a/lib/core/renderer.js +++ b/lib/core/renderer.js @@ -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 })};`