Skip to content

Commit df1aa5b

Browse files
committedMar 18, 2025··
fix: cleanup on rebuild
1 parent 0176726 commit df1aa5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ export async function buildSingle(
9090
onSuccess,
9191
} = config
9292

93-
if (clean) await cleanOutDir(outDir, clean)
94-
9593
const pkg = await readPackageJson(process.cwd())
9694

9795
await rebuild(true)
@@ -101,6 +99,8 @@ export async function buildSingle(
10199

102100
async function rebuild(first?: boolean) {
103101
const startTime = performance.now()
102+
if (clean) await cleanOutDir(outDir, clean)
103+
104104
await Promise.all(
105105
format.map(async (format) => {
106106
const inputOptions = await mergeUserOptions(

0 commit comments

Comments
 (0)
Please sign in to comment.