mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-14 12:48:16 +00:00
hook: Add render:route hook
This commit is contained in:
parent
fe0ad908b7
commit
ad59f788dc
@ -283,7 +283,10 @@ export default class Renderer {
|
|||||||
|
|
||||||
res.statusCode = 200
|
res.statusCode = 200
|
||||||
try {
|
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) {
|
if (redirected) {
|
||||||
return html
|
return html
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user