fix(vite): prod build hang, close #336 (#361)

* fix(vite): prod build hang, close #336

* chore: update
This commit is contained in:
Anthony Fu 2021-07-23 22:45:06 +08:00 committed by GitHub
parent 928d10ab77
commit a01dd69fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,10 @@ export async function build (nuxt: Nuxt) {
await bundle(nuxt) await bundle(nuxt)
await nuxt.callHook('build:done', { nuxt }) await nuxt.callHook('build:done', { nuxt })
if (!nuxt.options.dev) {
await nuxt.callHook('close', nuxt)
}
} }
function watch (nuxt: Nuxt) { function watch (nuxt: Nuxt) {