mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(builder): empty buildDir only once by build
This commit is contained in:
parent
d63b28303e
commit
7b3244a567
@ -44,6 +44,7 @@ export class Builder {
|
||||
async function build (builder: Builder) {
|
||||
const { nuxt } = builder
|
||||
|
||||
await fsExtra.emptyDir(nuxt.options.buildDir)
|
||||
await generate(builder)
|
||||
|
||||
if (nuxt.options.dev) {
|
||||
@ -82,7 +83,6 @@ function watch (builder: Builder) {
|
||||
export async function generate (builder: Builder) {
|
||||
const { nuxt } = builder
|
||||
|
||||
await fsExtra.emptyDir(nuxt.options.buildDir)
|
||||
builder.app = await createApp(builder)
|
||||
|
||||
const templatesDir = join(builder.nuxt.options.appDir, '_templates')
|
||||
|
Loading…
Reference in New Issue
Block a user