feat: refactoring project
This commit is contained in:
8
node_modules/webpack/lib/cache/IdleFileCachePlugin.js
generated
vendored
8
node_modules/webpack/lib/cache/IdleFileCachePlugin.js
generated
vendored
@@ -11,7 +11,7 @@ const ProgressPlugin = require("../ProgressPlugin");
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
/** @typedef {import("./PackFileCacheStrategy")} PackFileCacheStrategy */
|
||||
|
||||
const BUILD_DEPENDENCIES_KEY = Symbol();
|
||||
const BUILD_DEPENDENCIES_KEY = Symbol("build dependencies key");
|
||||
|
||||
class IdleFileCachePlugin {
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ class IdleFileCachePlugin {
|
||||
* @returns {void}
|
||||
*/
|
||||
apply(compiler) {
|
||||
let strategy = this.strategy;
|
||||
const strategy = this.strategy;
|
||||
const idleTimeout = this.idleTimeout;
|
||||
const idleTimeoutForInitialStore = Math.min(
|
||||
idleTimeout,
|
||||
@@ -119,7 +119,7 @@ class IdleFileCachePlugin {
|
||||
currentIdlePromise = promise.then(() => strategy.afterAllStored());
|
||||
if (reportProgress) {
|
||||
currentIdlePromise = currentIdlePromise.then(() => {
|
||||
reportProgress(1, `stored`);
|
||||
reportProgress(1, "stored");
|
||||
});
|
||||
}
|
||||
return currentIdlePromise.then(() => {
|
||||
@@ -175,7 +175,7 @@ class IdleFileCachePlugin {
|
||||
}
|
||||
};
|
||||
/** @type {ReturnType<typeof setTimeout> | undefined} */
|
||||
let idleTimer = undefined;
|
||||
let idleTimer;
|
||||
compiler.cache.hooks.beginIdle.tap(
|
||||
{ name: "IdleFileCachePlugin", stage: Cache.STAGE_DISK },
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user