-
Notifications
You must be signed in to change notification settings - Fork 49.1k
Improve formatting of errors when building #11456
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
Conversation
Can you add a screenshot? |
It would be nice to get some syntax highlighting for this. Babel does it. |
Could you add a screenshot of babel's syntax highlighting? To make sure we are on the same page :) |
Yes! And it would be nice to remove |
Do you plan to finish this with the syntax highlighting? |
I would like to finish this with the syntax highlighting but there seems to be an issue with rollup's Would it be ok to leave this PR open in the mean time? |
Sure let's keep it open. |
I have a PR open for the issue I mentioned about rollup's |
@gaearon |
Can you please send a separate PR for updating Rollup first? Since it may not be obvious from from commit log and it's a substantial change. Please also run |
Finished up this PR by removing rollup upgrade and merging master branch |
CI fails? |
Didn't run yarn prettier 😞 Fixed it now. |
Thanks! This is great. |
It seems like there's an issue in case the error is a syntax error from Babel. Then |
I fixed with 0182769. |
* Improve formatting of errors when building * Remove undefined from the header when error.plugin is undefined * Add babel-code-frame and syntax highlighting in error message * Run yarn prettier and fix code format
Fix #11454
I don't know the history behind using
error.codeFrame
incatch()
but it seems that rollup is providing with the formatted lines inside
error.frame
instead oferror.codeFrame
What I could find so far about rollup's
error.frame
is hereand the related
getCodeFrame
here