Skip to content

Commit fe1350a

Browse files
committed
use beforeRun hook for handle 0
1 parent a9ada9f commit fe1350a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/ProgressPlugin.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const median3 = (a, b, c) => {
2828
};
2929

3030
const createDefaultHandler = (profile, logger) => {
31-
let wasLogged = false;
3231
/** @type {{ value: string, time: number }[]} */
3332
const lastStateInfo = [];
3433

@@ -87,10 +86,6 @@ const createDefaultHandler = (profile, logger) => {
8786
}
8887
}
8988
}
90-
if (percentage === 0 && !wasLogged) {
91-
wasLogged = true;
92-
return;
93-
}
9489
logger.status(`${Math.floor(percentage * 100)}%`, msg, ...args);
9590
if (percentage === 1 || (!msg && args.length === 0)) logger.status();
9691
};
@@ -536,7 +531,7 @@ class ProgressPlugin {
536531
}
537532
});
538533
interceptHook(compiler.cache.hooks.endIdle, 0.01, "cache", "end idle");
539-
compiler.hooks.initialize.intercept({
534+
compiler.hooks.beforeRun.intercept({
540535
name: "ProgressPlugin",
541536
call() {
542537
handler(0, "");

0 commit comments

Comments
 (0)