File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export function resolveClean(
6666 return clean
6767}
6868
69- export async function cleanupChunks (
69+ export async function cleanChunks (
7070 outDir : string ,
7171 chunks : Array < OutputAsset | OutputChunk > ,
7272) : Promise < void > {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515 type ResolvedConfig ,
1616} from './config/index.ts'
1717import { warnLegacyCJS } from './features/cjs.ts'
18- import { cleanOutDir , cleanupChunks } from './features/clean.ts'
18+ import { cleanChunks , cleanOutDir } from './features/clean.ts'
1919import { copy } from './features/copy.ts'
2020import { createHooks , executeOnSuccess } from './features/hooks.ts'
2121import { bundleDone , initBundleByPkg } from './features/pkg/index.ts'
@@ -196,7 +196,10 @@ export async function buildSingle(
196196 watcher . on ( 'event' , async ( event ) => {
197197 switch ( event . code ) {
198198 case 'START' : {
199- await cleanupChunks ( config . outDir , chunks )
199+ if ( config . clean ) {
200+ await cleanChunks ( config . outDir , chunks )
201+ }
202+
200203 chunks . length = 0
201204 hasError = false
202205 break
You can’t perform that action at this time.
0 commit comments