-
Notifications
You must be signed in to change notification settings - Fork 17
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
Sourcemaps incorrect line number #101
Comments
Hi @paradox37, big thanks for the issue. I'll take a look at this and see what I can come up with. The issue i feel might be that there is something that the underlying instrumenter is doing wrong (official istanbul-lib-instrument). As it is using babel to analyse the code it might affect the sourcemap as we use the returned sourcemap to match the coverage to the sourcemap. Thanks! |
Same here. Is there any progress? |
🎉 This issue has been resolved in version 5.0.0-rc.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Please try out the new version to see if the fix is working in the pre release. And i will plan a stable release if it gets good responses. |
Describe the bug
As soon as I add this plugin to vite config, I get the wrong line number in browser Console in case of console.log or when unexpected error occurs, which is affecting debugging pretty much.
I expect this plugin to does not affect sourcemaps in a way that points to a wrong line. You can see this behavior in stackblitz I provided. I used stackblitz template preset from ViteJs site, and just added this plugin and one
console.log
.Also, take a look at screen shot. Console says line 14, but it's actually 7.
Reproduction
https://stackblitz.com/edit/vitejs-vite-hcnpyq?terminal=dev
Steps to reproduce
App.tsx:14
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: