-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
nitrojs/nitro
#2287Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
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: [email protected]
- Builder: -
- User Config: modules, routeRules, hooks
- Runtime Modules: @nuxt/[email protected]
- 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
jonasolesen, JCJang, AndrewBogdanovTSS, tobiasdiez, painerp and 5 morearkhaiel, JCJang, kravemir, benemohamed, gabrielsze and 3 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request