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

Sourcemaps are missing closing braces #1448

Closed
edoardocavazza opened this issue Jul 16, 2021 · 3 comments
Closed

Sourcemaps are missing closing braces #1448

edoardocavazza opened this issue Jul 16, 2021 · 3 comments

Comments

@edoardocavazza
Copy link

Hi! I noticed that closing braces are not correctly mapped in sourcemaps generated by esbuild. Am I missing some configuration detail or is it something esbuild currently does not handle?

image

@evanw
Copy link
Owner

evanw commented Jul 16, 2021

Source maps don’t remap every single thing, just the important parts. I think you shouldn’t ever hit an exception or a pause in execution in those spots when using a debugger.

@edoardocavazza
Copy link
Author

Yeah this is true for the debugging process, but tools for coverage reporting use them :( I don't know if other tools rely on those informations.

@glromeo
Copy link

glromeo commented Feb 27, 2022

@evanw I would like to make a case for the closing brackets as well because indeed I ran into an issue trying to use v8-to-istanbul where because the end range is missing in the sourcemap an entire function is ignored and marked as covered.
From one side I am trying to see whether is possible for the code coverage tool to be more resilient but from another side I see how the mapping for the end range would make the code coverage more precise and if it's not too much of a trouble (or of a performance drag) I'd love to see the change to happen in esbuild.
Would that be something you would consider a PR for if you don't have time for it?

@evanw evanw closed this as completed in c4d45e6 Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants