Skip to content

Commit

Permalink
perf: improve glob performance by 40%
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed May 12, 2020
1 parent 954cbf9 commit b1be4be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/builder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ Builder.prototype.glob = function(...patterns) {
`Please install picomatch: "npm i picomatch" to use glob matching.`
);
}
const isMatch = pm(patterns);
this.options.filter = (path) => {
return pm.isMatch(path, patterns);
return isMatch(path, patterns);
};
return this;
};
Expand Down

0 comments on commit b1be4be

Please sign in to comment.