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(
3939 / [ \\ / ] \. g i t [ \\ / ] / ,
4040 / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
4141 options . outDir ,
42- ...toArray ( options . ignoreWatch ) ,
42+ ...options . ignoreWatch ,
4343 ] ,
4444 } )
4545
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { resolveClean } from '../features/clean'
77import { resolveEntry } from '../features/entry'
88import { resolveTarget } from '../features/target'
99import { resolveTsconfig } from '../features/tsconfig'
10- import { resolveRegex , slash } from '../utils/general'
10+ import { resolveRegex , slash , toArray } from '../utils/general'
1111import { createLogger } from '../utils/logger'
1212import { normalizeFormat , readPackageJson } from '../utils/package'
1313import type { Awaitable } from '../utils/types'
@@ -283,6 +283,14 @@ async function resolveConfig(
283283 }
284284 }
285285
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+
286294 const config : ResolvedOptions = {
287295 ...userConfig ,
288296 entry,
Original file line number Diff line number Diff line change @@ -465,6 +465,7 @@ export type ResolvedOptions = Omit<
465465 exports : false | ExportsOptions
466466 nodeProtocol : 'strip' | boolean
467467 logger : Logger
468+ ignoreWatch : Array < string | RegExp >
468469 }
469470 > ,
470471 'config' | 'fromVite'
You can’t perform that action at this time.
0 commit comments