File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,22 @@ export function resolveChokidarOptions(
99 config : ResolvedConfig ,
1010 options : WatchOptions | undefined ,
1111) : WatchOptions {
12- const { ignored = [ ] , ...otherOptions } = options ?? { }
12+ const { ignored : ignoredList , ...otherOptions } = options ?? { }
13+ const ignored : WatchOptions [ 'ignored' ] = [
14+ '**/.git/**' ,
15+ '**/node_modules/**' ,
16+ '**/test-results/**' , // Playwright
17+ glob . escapePath ( config . cacheDir ) + '/**' ,
18+ ...arraify ( ignoredList || [ ] ) ,
19+ ]
20+ if ( config . build . outDir ) {
21+ ignored . push (
22+ glob . escapePath ( path . resolve ( config . root , config . build . outDir ) ) + '/**' ,
23+ )
24+ }
1325
1426 const resolvedWatchOptions : WatchOptions = {
15- ignored : [
16- '**/.git/**' ,
17- '**/node_modules/**' ,
18- '**/test-results/**' , // Playwright
19- glob . escapePath ( config . cacheDir ) + '/**' ,
20- glob . escapePath ( path . resolve ( config . root , config . build . outDir ) ) + '/**' ,
21- ...arraify ( ignored ) ,
22- ] ,
27+ ignored,
2328 ignoreInitial : true ,
2429 ignorePermissionErrors : true ,
2530 ...otherOptions ,
You can’t perform that action at this time.
0 commit comments