File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export async function watchBuild(
39
39
/ [ \\ / ] \. g i t [ \\ / ] / ,
40
40
/ [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
41
41
options . outDir ,
42
- ...toArray ( options . ignoreWatch ) ,
42
+ ...options . ignoreWatch ,
43
43
] ,
44
44
} )
45
45
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { resolveClean } from '../features/clean'
7
7
import { resolveEntry } from '../features/entry'
8
8
import { resolveTarget } from '../features/target'
9
9
import { resolveTsconfig } from '../features/tsconfig'
10
- import { resolveRegex , slash } from '../utils/general'
10
+ import { resolveRegex , slash , toArray } from '../utils/general'
11
11
import { createLogger } from '../utils/logger'
12
12
import { normalizeFormat , readPackageJson } from '../utils/package'
13
13
import type { Awaitable } from '../utils/types'
@@ -283,6 +283,14 @@ async function resolveConfig(
283
283
}
284
284
}
285
285
286
+ ignoreWatch = toArray ( ignoreWatch ) . map ( ( ignore ) => {
287
+ ignore = resolveRegex ( ignore )
288
+ if ( typeof ignore === 'string' ) {
289
+ return path . resolve ( cwd , ignore )
290
+ }
291
+ return ignore
292
+ } )
293
+
286
294
const config : ResolvedOptions = {
287
295
...userConfig ,
288
296
entry,
Original file line number Diff line number Diff line change @@ -465,6 +465,7 @@ export type ResolvedOptions = Omit<
465
465
exports : false | ExportsOptions
466
466
nodeProtocol : 'strip' | boolean
467
467
logger : Logger
468
+ ignoreWatch : Array < string | RegExp >
468
469
}
469
470
> ,
470
471
'config' | 'fromVite'
You can’t perform that action at this time.
0 commit comments