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
ANSI color codes in chrome console output #837
Comments
Can I have some more information, what plugin you're using etc? |
Using webpack these loaders
and this plugin
|
There's not really anything that can be done besides removing the ANSI syntax highlighting altogether. |
Is this default behavior, or is it due to some part of my configuration? |
It's default behaviour. It automatically ANSI syntax highlights if the terminal supports-colors. You should be able to disable the colors with the following command: $ TERM=dumb INSERT_YOUR_COMMAND_HERE |
I really like the terminal colors :-D , so I think I'll just patch my console.error to strip ansi with https://github.com/sindresorhus/strip-ansi Thanks for your help! |
Ah great, no problem! |
This problem still exists, and I don't think expecting users to use strip-ansi is a real solution. Could you reopen this issue? |
Just thought of a way I could make it work: err.stack = {
inspect: function () { return coloredStack; },
toString: function () { return noncoloredStack; },
toJSON: function () { return noncoloredStack; }
}; Will dump colored output for the console but if it's serialised it'll be a non-colored string. Only issue is consumers that expect |
It's really hacky so I'll have to do some testing to see if it's practical. I'm hesitant on adding an additional option if it can be done some other (albeit hacky) way. |
In the next release you'll be able to set the |
👍 |
Chiming in on an old issue... How about having Consuming apps like ember-cli would seem to be better-equipped to know whether to print color (e.g. by parsing a |
I'm getting this in my chrome console on error
The text was updated successfully, but these errors were encountered: