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

Commit

Permalink
perf(index): use the compiler's cached fs for stats (`this.fs.sta…
Browse files Browse the repository at this point in the history
…t`) (#42)
  • Loading branch information
gusvargas authored and michael-ciniawsky committed Oct 25, 2018
1 parent 74fccc4 commit d8c630b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function loader(...args) {
let cache = true;

const toDepDetails = (dep, mapCallback) => {
fs.stat(dep, (err, stats) => {
this.fs.stat(dep, (err, stats) => {
if (err) {
mapCallback(err);
return;
Expand Down Expand Up @@ -110,7 +110,7 @@ function pitch(remainingRequest, prevRequest, dataInput) {
return;
}
async.each(cacheData.dependencies.concat(cacheData.contextDependencies), (dep, eachCallback) => {
fs.stat(dep.path, (statErr, stats) => {
this.fs.stat(dep.path, (statErr, stats) => {
if (statErr) {
eachCallback(statErr);
return;
Expand Down

0 comments on commit d8c630b

Please sign in to comment.