fix(builder): empty dir before generate

This commit is contained in:
pooya parsa 2020-10-29 21:10:16 +01:00
parent 0b18f77746
commit 8a1cb84518

View File

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