Skip to content

Doesn't work with plugins that refresh terminal #31

@alxtz

Description

@alxtz

Issue

plugins like friendly-errors-webpack-plugin or clean-terminal-webpack-plugin clean the terminal screen after every emit event in webpack, which would clean the current files display that's using process.stdout.write

Screenshots

the screen after refresh
image

if scroll on top, the file names are cleared
image

Solutions

I've looked at how some other plugins does this, it turns out like unused-files-webpack-plugin just outputs a long string as the message for new Error() , I didn't really found a better way to do this (maybe can dig into webpack to see what are the formats compilation.warnings supports

Proposal

I've wrote a small PoC for using long new Error() strings instead of process.stdout.write() , the output would look like
image , the output would not be cleared for those plugins

The example code is here, master...alxtz:master , if this looks fine I can clean up the code & write a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions