fix(nuxi): display log when restarting nuxt (#22500)

This commit is contained in:
Daniel Roe 2023-08-05 09:43:51 +01:00 committed by GitHub
parent 14bf2b02f9
commit 48f0eade12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,9 +86,7 @@ export default defineNuxtCommand({
await currentNuxt.close().catch(() => {})
await watcher.close().catch(() => {})
await distWatcher.close().catch(() => {})
if (reason) {
consola.info(`${reason ? reason + '. ' : ''}Restarting nuxt...`)
}
consola.info(`${reason ? reason + '. ' : ''}Restarting nuxt...`)
process.send({ type: 'nuxt:restart' })
} else {
await load(true, reason)