Skip to content

Commit d447e49

Browse files
committed
Merge pull request webpack#301 from shama/cache-enoent
CachePlugin: Continue when file is deleted
2 parents af55e54 + 4fbd901 commit d447e49

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/CachePlugin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ CachePlugin.prototype.apply = function(compiler) {
1919
fileTs = compiler.fileTimestamps = {};
2020
async.forEach(compiler._lastCompilationFileDependencies, function(file, callback) {
2121
fs.stat(file, function(err, stat) {
22-
if(err) return callback(err);
22+
if(err) {
23+
if(err.code === 'ENOENT') return callback();
24+
return callback(err);
25+
}
2326

2427
fileTs[file] = stat.mtime || Infinity;
2528
callback();

0 commit comments

Comments
 (0)