From a01dd69fcc7cd1af466e10cb7640f9a0bf92ef8a Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 23 Jul 2021 22:45:06 +0800 Subject: [PATCH] fix(vite): prod build hang, close #336 (#361) * fix(vite): prod build hang, close #336 * chore: update --- packages/nuxt3/src/builder.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nuxt3/src/builder.ts b/packages/nuxt3/src/builder.ts index 1d4bcde643..3e11fee626 100644 --- a/packages/nuxt3/src/builder.ts +++ b/packages/nuxt3/src/builder.ts @@ -25,6 +25,10 @@ export async function build (nuxt: Nuxt) { await bundle(nuxt) await nuxt.callHook('build:done', { nuxt }) + + if (!nuxt.options.dev) { + await nuxt.callHook('close', nuxt) + } } function watch (nuxt: Nuxt) {