Skip to content

Commit a52d04a

Browse files
committed
fix(sircli): builder
1 parent 678431d commit a52d04a

File tree

1 file changed

+4
-4
lines changed
  • tools/sircli/src/plugins/builder/utils

1 file changed

+4
-4
lines changed

tools/sircli/src/plugins/builder/utils/build.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ export const build = async (options: BuildOptions) => {
2020
try {
2121
const tempDir = join(options.cwd, 'dist', '.build')
2222

23-
const chunkFiles = [...new Bun.Glob(join(tempDir, './**/chunk-*')).scanSync()]
24-
25-
await Promise.all(chunkFiles.map(file => unlink(file)))
26-
2723
if (!(await exists(tempDir))) {
2824
await mkdir(tempDir, {
2925
recursive: true,
3026
})
3127
}
3228

29+
const chunkFiles = [...new Bun.Glob(join(tempDir, './**/chunk-*')).scanSync()]
30+
31+
await Promise.all(chunkFiles.map(file => unlink(file)))
32+
3333
const builder = await Bun.build({
3434
entrypoints: options.entries.map(entry => entry.source),
3535
splitting: true,

0 commit comments

Comments
 (0)