Skip to content

Commit

Permalink
fix: should remove outDir before build (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin authored Jul 2, 2020
1 parent ebfeed2 commit 783bf9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export async function build(options: BuildConfig): Promise<BuildResult> {
spinner = require('ora')(msg + '\n').start()
}
}
await fs.remove(outDir)

const indexPath = path.resolve(root, 'index.html')
const publicBasePath = base.replace(/([^/])$/, '$1/') // ensure ending slash
Expand Down Expand Up @@ -353,7 +354,6 @@ export async function build(options: BuildConfig): Promise<BuildResult> {
}
}

await fs.remove(outDir)
await fs.ensureDir(outDir)

// write js chunks and assets
Expand Down

0 comments on commit 783bf9b

Please sign in to comment.