feat: refactoring project
This commit is contained in:
10
node_modules/webpack/lib/cache/MemoryWithGcCachePlugin.js
generated
vendored
10
node_modules/webpack/lib/cache/MemoryWithGcCachePlugin.js
generated
vendored
@@ -20,6 +20,7 @@ class MemoryWithGcCachePlugin {
|
||||
constructor({ maxGenerations }) {
|
||||
this._maxGenerations = maxGenerations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply the plugin
|
||||
* @param {Compiler} compiler the compiler instance
|
||||
@@ -106,12 +107,11 @@ class MemoryWithGcCachePlugin {
|
||||
oldCache.delete(identifier);
|
||||
cache.set(identifier, cacheEntry);
|
||||
return null;
|
||||
} else {
|
||||
if (cacheEntry.etag !== etag) return null;
|
||||
oldCache.delete(identifier);
|
||||
cache.set(identifier, cacheEntry);
|
||||
return cacheEntry.data;
|
||||
}
|
||||
if (cacheEntry.etag !== etag) return null;
|
||||
oldCache.delete(identifier);
|
||||
cache.set(identifier, cacheEntry);
|
||||
return cacheEntry.data;
|
||||
}
|
||||
gotHandlers.push((result, callback) => {
|
||||
if (result === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user