Closed
Description
Environment
- Operating System: Linux
- Node Version: v16.20.0
- Nuxt Version: 3.7.0
- CLI Version: 3.7.2
- Nitro Version: 2.6.2
- Package Manager: npm@9.4.2
- Builder: -
- User Config: modules, routeRules, hooks
- Runtime Modules: @nuxt/devtools@0.8.2
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-c8qlr3?file=server%2Fplugins%2Ftest.ts
Describe the bug
If we add the page to routeRules (prerender: true
) and start some timer/listener in the Nitro plugin, the process does not close after the build.
Also nitro.hooks.hook('close', () => {})
will never be called.
Additional context
It was working fine on Nuxt 3.6.5.
Temporary workaround (UPDATED):
export default defineNuxtConfig({
hooks: {
close: (nuxt) => {
if (!nuxt.options._prepare)
process.exit()
}
}
})
Logs
No response