Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4: stats colors not enabled by default #1915

Closed
lucalooz opened this issue Oct 10, 2020 · 4 comments · Fixed by #1944
Closed

v4: stats colors not enabled by default #1915

lucalooz opened this issue Oct 10, 2020 · 4 comments · Fixed by #1944
Labels

Comments

@lucalooz
Copy link

lucalooz commented Oct 10, 2020

Describe the bug

I have just upgraded from v3.3.12 to v4.0.0 and I don't see a colored output on the terminal as before.

What is the current behavior?

Webpack works fine but I don't have colored output.

To Reproduce

Upgrade to v4.0.0.

Expected behavior

Colored output as on v3.3.12.

  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 471.39 MB / 16.00 GB
  Binaries:
    Node: 14.13.0 - ~/.nvm/versions/node/v14.13.0/bin/node
    Yarn: 2.3.2 - ~/.nvm/versions/node/v14.13.0/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.13.0/bin/npm
  Browsers:
    Chrome: 85.0.4183.121
    Firefox: 81.0
    Safari: 14.0
  Packages:
    fork-ts-checker-webpack-plugin: ^5.2.0 => 5.2.0 
    webpack: 5.0.0-rc.6 => 5.0.0-rc.6 
    webpack-cli: 4.0.0 => 4.0.0 

Additional context

I have tried to:

  • downgrade to v3.3.12 -> WORKS
  • downgrade webpack from v5 to v4 while keeping cli at v4 -> DOESN'T WORK
@lucalooz lucalooz added the Bug label Oct 10, 2020
@lucalooz lucalooz changed the title v4: no colors on macOS + zsh v4: stats colors not enabled by default Oct 11, 2020
@lucalooz
Copy link
Author

It seems that's just a different default configuration of the stats portion passed down to webpack.

On v3.x.x I see that if there isn't a a chosen preference then it's automatically enabled if the terminal supports a colored output.

if (typeof outputOptions.colors === "undefined") outputOptions.colors = require("supports-color").stdout;

return require("supports-color").stdout;

@alexander-akait
Copy link
Member

We should fix it, because wepack don’t know noting about env, it can be cli and node or browser, or something else

@alexander-akait
Copy link
Member

/cc @webpack/cli-team because it is regression we should fix it asap

@alexander-akait
Copy link
Member

WIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants