-
-
Notifications
You must be signed in to change notification settings - Fork 247
TS error in file can no longer be opened at the error location (v4 -> v5) #481
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
Comments
Hi! |
Hi @piotr-oles. Darn, that's a shame. Interesting suggestion, but am I right that will still leave a space between the file name and the location, making it non-linkable? Kind of surprising that's the Webpack standard, everything I've looked up today about file links seem to use |
You are right, it wouldn't help you :/ The formatting logic is here. I think this issue should be directed to the webpack's team :) |
I think the lack of clickable console errors is unfortunate; with v4 we offered the ability to supply a formatter: (quote from v4 docs)
This is a way to get around formatting decisions in webpack that aren't console click friendly whilst not breaking standard usage. Is there any reason we couldn't bring this back? Clickable console errors are a tremendously useful feature! (I love being able to click in VS Code's terminal and bounce straight to the problem - keeps me in flow) |
Currently, in the I was thinking about this a little bit more, and I changed my mind. I think that being consistent with the webpack format shouldn't be more important than developer experience. If the |
Thanks @piotr-oles - I completely agree! @robcrocombe fancy having a go at a PR? 🤗 |
Lovely! Yes, I should be able to do that. Is there a preference on the format? I think |
Looking at this reference: microsoft/vscode#66957 (comment) To quote @Tyriar:
I think that |
🎉 This issue has been resolved in version 5.0.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm upgrading from v4 to v5, and noticed the issue location in the code frame display is different. It used to be displayed with brackets around the location, and without the range, e.g:
/customer.ts(86,16)
. But now it has a space and no brackets e.g:/customer.ts 86:16-24
.This is an issue for me as in iTerm I could cmd+click the file name to open it in my editor (Sublime Text), and it would open with the cursor on the line where the error occurred. With v5 however, the new formatting means only the file will open - not the location where the error happened. This is a big productivity issue for me.
Is there any way to restore some of the old behaviour or customise the output file location to display it without range and in brackets? Either in this library or something I can do to my Webpack config. Thanks!
Current behavior
In v5, the location with range is given after a space.
Expected behavior
In v4, the location is given without range, in brackets next to the file.
In order for editors like Sublime and VSCode to open at the location, I think the format needs to be
FILE_NAME(LINE,COL)
orFILE_NAME:LINE:COL
.Steps to reproduce the issue
Get a TypeScript error.
Issue reproduction repository
None provided.
Environment
The text was updated successfully, but these errors were encountered: