Commit 1d263d3 1 parent 81b3bd0 commit 1d263d3 Copy full SHA for 1d263d3
File tree 1 file changed +14
-9
lines changed
1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,22 @@ export function resolveChokidarOptions(
9
9
config : ResolvedConfig ,
10
10
options : WatchOptions | undefined ,
11
11
) : 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
+ }
13
25
14
26
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,
23
28
ignoreInitial : true ,
24
29
ignorePermissionErrors : true ,
25
30
...otherOptions ,
You can’t perform that action at this time.
0 commit comments