Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Commit d8c630b

Browse files
gusvargasmichael-ciniawsky
authored andcommitted
perf(index): use the compiler's cached fs for stats (this.fs.stat) (#42)
1 parent 74fccc4 commit d8c630b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function loader(...args) {
4040
let cache = true;
4141

4242
const toDepDetails = (dep, mapCallback) => {
43-
fs.stat(dep, (err, stats) => {
43+
this.fs.stat(dep, (err, stats) => {
4444
if (err) {
4545
mapCallback(err);
4646
return;
@@ -110,7 +110,7 @@ function pitch(remainingRequest, prevRequest, dataInput) {
110110
return;
111111
}
112112
async.each(cacheData.dependencies.concat(cacheData.contextDependencies), (dep, eachCallback) => {
113-
fs.stat(dep.path, (statErr, stats) => {
113+
this.fs.stat(dep.path, (statErr, stats) => {
114114
if (statErr) {
115115
eachCallback(statErr);
116116
return;

0 commit comments

Comments
 (0)