From 8a1cb845187540ea41acecd75369d95047ba5014 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Thu, 29 Oct 2020 21:10:16 +0100 Subject: [PATCH] fix(builder): empty dir before generate --- packages/nuxt3/src/builder/builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt3/src/builder/builder.ts b/packages/nuxt3/src/builder/builder.ts index ecc22efdbb..c395929f16 100644 --- a/packages/nuxt3/src/builder/builder.ts +++ b/packages/nuxt3/src/builder/builder.ts @@ -76,7 +76,7 @@ function watch (builder: Builder) { export async function generate (builder: Builder) { const { nuxt } = builder - await fsExtra.mkdirp(nuxt.options.buildDir) + await fsExtra.emptyDir(nuxt.options.buildDir) builder.app = await createApp(builder) const templatesDir = join(builder.nuxt.options.appDir, '_templates')