vite/patches/chokidar@3.6.0.patch
renovate[bot] e0a6ef2b9e
fix(deps): update all non-major dependencies (#15803)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-02-08 10:43:45 +01:00

15 lines
752 B
Diff

diff --git a/lib/fsevents-handler.js b/lib/fsevents-handler.js
index fe29393c179d3d6673f996ca6f95bbc83f9a0699..08e425fa3135df4b6d1912329f4d8b8b99c8048c 100644
--- a/lib/fsevents-handler.js
+++ b/lib/fsevents-handler.js
@@ -305,7 +305,8 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
const opts = this.fsw.options;
const watchCallback = async (fullPath, flags, info) => {
- if (this.fsw.closed) return;
+ // PATCH: bypass the callback for better perf when fullPath hit the ignored file list
+ if (this.fsw.closed || this.fsw._isIgnored(fullPath)) return;
if (
opts.depth !== undefined &&
calcDepth(fullPath, realPath) > opts.depth