TypeStrong / fork-ts-checker-webpack-plugin

Webpack plugin that runs typescript type checker on a separate process.
MIT License
1.95k stars 240 forks source link

fix: issue-webpack-error should not add colors to file string #825

Closed sreucherand closed 11 months ago

sreucherand commented 12 months ago

Introduced in #641, the issue location is now coloured in green in both the terminal console and in the error sent to webpack.

No problem at all in the terminal:

image

Having a look at the message sent through ws:

image

The file property contains the ANSI chalk chars corresponding to the colour applied to the issue location.

The thing is, in the webpack-dev-server overlay, the location does not come up properly:

image

In fact, the overlay does not seem to apply a ANSI to HTML conversion for the header of the message (file) (see. overlay.js#L247) but only for the body of the message (message) (see. overlay.js#L262).

I suggest that we just remove the coloured location in the error message sent to webpack.

Here is a minimum reproducible example: https://github.com/sreucherand/webpack-ts-checker-minimal-reproducible-example

yarn
yarn start
sreucherand commented 11 months ago

Hi @piotr-oles, did you have the opportunity to look at this?

piotr-oles commented 11 months ago

Hi! The change looks reasonable, let's wait for the CI to pass and we can merge it

github-actions[bot] commented 11 months ago

:tada: This PR is included in version 9.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: