10000 fix: Ignored patterns to watcher · fuse-box/fuse-box@1bc00ca · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 1bc00ca

Browse files
committed
fix: Ignored patterns to watcher
1 parent c61a26b commit 1bc00ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/BundleProducer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,14 @@ export class BundleProducer {
199199
}
200200

201201
let ready = false;
202+
const ignoredPatterns = [/\.fusebox/, /node-modules/];
202203
chokidar
203204
.watch(this.chokidarPaths || this.fuse.context.homeDir, chokidarOptions)
204205
.on("all", (event, fp) => {
205206
if (ready) {
206-
this.onChanges(settings, fp);
207+
if (!ignoredPatterns.find(pattern => pattern.test(fp))) {
208+
this.onChanges(settings, fp);
209+
}
207210
}
208211
})
209212
.on("ready", () => {

0 commit comments

Comments
 (0)
0