webpackbar icon indicating copy to clipboard operation
webpackbar copied to clipboard

Bar gets duplicated if a long line is printed during build

Open mogzol opened this issue 8 months ago • 1 comments

Environment

webpackbar: 7.0.0 Node: 22.14.0

Reproduction

In the playground example in the repo, change the setInterval at the end of webpack.config.dev to:

setTimeout(() => {
  console.log("This is a verrrrrrrrrrryyyyyyyyyyy long message that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on");
}, 250);

Then resize your terminal so that it is fairly narrow (around 80 cols) and run the playground example. You will notice that after that line is logged, the progress bar starts getting duplicated:

Image

Describe the bug

Webpackbar does not properly count extra lines that break to another line, so it does not clear the correct number of lines and results in duplicated progress bars.

Additional context

No response

mogzol avatar Apr 03 '25 23:04 mogzol

+1 i noticed the same behavior. When fix will be delivered?

mateBe95 avatar Apr 28 '25 10:04 mateBe95

so many bars....

Image

BingruLin avatar Oct 15 '25 08:10 BingruLin

Yeah, I switched to using my modified version that I mentioned in the PR I submitted. Hopefully that gets reviewed and merged at some point so I can switch back to the official release.

mogzol avatar Oct 16 '25 03:10 mogzol