rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Feature]: Enable `stats.colors` by default in an environment that supports color output

Open chenjiahan opened this issue 8 months ago • 1 comments

What problem does this feature solve?

Currently the stats.colors is only enabled by default when using the Rspack CLI, see:

https://github.com/web-infra-dev/rspack/blob/92ddee29009c90ec35f04a69edf1f2ccb8beaf77/packages/rspack-cli/src/cli.ts#L202-L209

For users using using JavaScript API, stats.colors should be enabled by default in an environment that supports color output, we can move the above code to @rspack/core or to the Rust side.

What does the proposed API of configuration look like?

/

Ref

https://crates.io/crates/supports-color

chenjiahan avatar Feb 18 '25 05:02 chenjiahan