hook: Add render:route hook

This commit is contained in:
Sébastien Chopin 2017-10-30 23:15:06 +01:00
parent fe0ad908b7
commit ad59f788dc

View File

@ -283,7 +283,10 @@ export default class Renderer {
res.statusCode = 200
try {
const { html, error, redirected, resourceHints } = await this.renderRoute(req.url, context)
const result = await this.renderRoute(req.url, context)
await this.nuxt.callHook('render:route', req.url, result)
const { html, error, redirected, resourceHints } = result
if (redirected) {
return html
}