fix(nuxt): await prerender:routes hook (#22247)

This commit is contained in:
Rudolf Byker 2023-07-20 15:22:10 +02:00 committed by GitHub
parent 3cb10d6dc8
commit 9742bffac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
// Connect hooks
nuxt.hook('close', () => nitro.hooks.callHook('close'))
nitro.hooks.hook('prerender:routes', (routes) => {
nuxt.callHook('prerender:routes', { routes })
return nuxt.callHook('prerender:routes', { routes })
})
// Enable runtime compiler client side