fix(cli): ensure nuxt instance is closed when skipping build

[release]

resolves nuxt/framework#494
This commit is contained in:
Pooya Parsa 2021-09-09 09:53:06 +02:00
parent 6f94b1f9d7
commit 3e9d7e3e7c

View File

@ -109,6 +109,7 @@ export async function ensureBuild (cmd) {
const changed = compareSnapshots(previousBuild.snapshot, currentBuild.snapshot) const changed = compareSnapshots(previousBuild.snapshot, currentBuild.snapshot)
if (!changed) { if (!changed) {
consola.success('Skipping webpack build as no changes detected') consola.success('Skipping webpack build as no changes detected')
await nuxt.close()
return return
} else { } else {
consola.info(`Doing webpack rebuild because ${changed} modified`) consola.info(`Doing webpack rebuild because ${changed} modified`)