mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxi): call listen hook on each restart (#4346)
This commit is contained in:
parent
c519ceec52
commit
32c798cfc4
@ -61,6 +61,7 @@ export default defineNuxtCommand({
|
||||
}
|
||||
currentNuxt = await loadNuxt({ rootDir, dev: true, ready: false })
|
||||
await currentNuxt.ready()
|
||||
await currentNuxt.hooks.callHook('listen', listener.server, listener)
|
||||
await Promise.all([
|
||||
writeTypes(currentNuxt).catch(console.error),
|
||||
buildNuxt(currentNuxt)
|
||||
@ -105,9 +106,6 @@ export default defineNuxtCommand({
|
||||
})
|
||||
|
||||
await load(false)
|
||||
if (currentNuxt) {
|
||||
await currentNuxt.hooks.callHook('listen', listener.server, listener)
|
||||
}
|
||||
|
||||
return 'wait'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user