Skip to content
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

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

Merged
merged 2 commits into from
Oct 29, 2023
Merged

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

merged 2 commits into from
Oct 29, 2023

Conversation

sreucherand
Copy link
Contributor

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
Copy link
Contributor Author

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

@piotr-oles
Copy link
Collaborator

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

@piotr-oles piotr-oles merged commit d5e7e32 into TypeStrong:main Oct 29, 2023
8 checks passed
@github-actions
Copy link

🎉 This PR is included in version 9.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants