Commit a3890cb
committed
fix(swc): fix inverted chokidar ignored filter in watch mode
The ignored callback in watchFilesInSrcDir had two layered bugs:
1. Extension format mismatch: the extensions array contains dotted
extensions (.ts) but the comparison stripped the dot, so the
filter never matched any files.
2. Inverted logic: the filter ignored files that matched source
extensions instead of ignoring files that don't match.
The net effect was that all files in the source directory triggered
the watcher, causing unnecessary recompilation for non-source
files like .json, .css, or .env.
Fix by using file.endsWith(ext) for robust matching and negating
the condition to properly ignore non-source files.1 parent be77cf3 commit a3890cb
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
0 commit comments