aboutsummaryrefslogtreecommitdiff
path: root/node_modules/webpack/lib/ContextModuleFactory.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/webpack/lib/ContextModuleFactory.js')
-rw-r--r--node_modules/webpack/lib/ContextModuleFactory.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/node_modules/webpack/lib/ContextModuleFactory.js b/node_modules/webpack/lib/ContextModuleFactory.js
index db4ba1022..a3bc34e7e 100644
--- a/node_modules/webpack/lib/ContextModuleFactory.js
+++ b/node_modules/webpack/lib/ContextModuleFactory.js
@@ -114,7 +114,15 @@ module.exports = class ContextModuleFactory extends Tapable {
const subResource = path.join(directory, seqment);
fs.stat(subResource, (err, stat) => {
- if(err) return callback(err);
+ if(err) {
+ if(err.code === "ENOENT") {
+ // ENOENT is ok here because the file may have been deleted between
+ // the readdir and stat calls.
+ return callback();
+ } else {
+ return callback(err);
+ }
+ }
if(stat.isDirectory()) {