Skip to content

Bar gets duplicated if a long line is printed during build #164

Open
@mogzol

Description

@mogzol

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions