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')