Is it possible to keep original colors of Elm errors in console, because they contain important information? Parcel turns all of them red, what makes it impossible to see where the actual record errors are.
Asked
Active
Viewed 109 times
0
-
I think your question needs a bit more context to be answerable. For example: Do you mean errors shown in logs? Do you want the errors on node console or browser console? How are the errors shown at the moment? Are you using a logger and what configuration it has? – kaskelotti Mar 23 '19 at 11:39
-
@kaskelotti Updates with more informations. The log options are default. – jligeza Mar 23 '19 at 11:46
1 Answers
0
I am not familiar with Parcel but recently I added such feature to elm-live and this is how I did it:
elm make
can return errors with formatting details (using the flag --report=json
). What need to be done is to convert this data into a colored message.
This function https://github.com/lucamug/elm-live/blob/enhancements/lib/src/elm-reload-client.js#L98 is coloring the error for the console and for the webpage.
This other function https://github.com/lucamug/elm-live/blob/enhancements/lib/src/elm-live.js#L103 is adding colors for the console.
Probably something similar need to be added to Parcel.

Lucamug
- 792
- 5
- 19