Describe the feature you'd like to request
When running a build with NO_COLOR=1, Vite does not put ANSI control sequences in the console output.
However, vite-plugin-image-optimizer does not yet honor this environment variable and generates colored output unconditionally. For example, this can be problematic when capturing the output in a log file. In my specific case, I'm trying to generate a GitHub PR comment containing the output from NO_COLOR=1 vite build, but the ANSI codes don't render correctly there.
Describe the solution you'd like
vite-plugin-image-optimizer should follow Vite's behavior and not produce colored output when the NO_COLOR=1 environment variable is set.
Since there already is an ansiColors configuration option, I imagine this should be an easy win.
Additional context
No response
Validations
Describe the feature you'd like to request
When running a build with
NO_COLOR=1, Vite does not put ANSI control sequences in the console output.However,
vite-plugin-image-optimizerdoes not yet honor this environment variable and generates colored output unconditionally. For example, this can be problematic when capturing the output in a log file. In my specific case, I'm trying to generate a GitHub PR comment containing the output fromNO_COLOR=1 vite build, but the ANSI codes don't render correctly there.Describe the solution you'd like
vite-plugin-image-optimizershould follow Vite's behavior and not produce colored output when theNO_COLOR=1environment variable is set.Since there already is an
ansiColorsconfiguration option, I imagine this should be an easy win.Additional context
No response
Validations