Skip to content

Commit

Permalink
Add a fix for MaxListenersExceededWarning (#2700)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesley luyten authored and lukastaegert committed Feb 16, 2019
1 parent 1454b90 commit 0a46310
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/watch/index.ts
Expand Up @@ -32,6 +32,9 @@ export class Watcher {
constructor(close: () => void) {
super();
this.close = close;
// Allows more than 10 bundles to be watched without
// showing the `MaxListenersExceededWarning` to the user.
this.setMaxListeners(Infinity);
}
}(this.close.bind(this));
this.tasks = (Array.isArray(configs) ? configs : configs ? [configs] : []).map(
Expand Down

0 comments on commit 0a46310

Please sign in to comment.