-
Notifications
You must be signed in to change notification settings - Fork 56
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
Defective source maps #240
Comments
Looks like a bug. I'll look at it but I won't have time this week. |
Any luck with this yet? |
@77V I have put a fix but I won't be testing it extensively because we are not routinely using sourcemaps in our build chain. If you validate it I'll push a new version to npm. |
I've cloned the repository and then npm installed it from that folder. However when I try too run the compiler I get the following message:
|
It looks like I fixed it with a different version of sourcemap. I'll investigate. |
@77V should work now with latest sourcemap code. |
It's working now, I'm closing the issue. |
Source maps that compiler produces have some defects. I've tried compiling a simple code snippet:
and it compiled to:
with a sourcemap:
The compiled code works as expected, however when I parsed the resulting b.map file using source-map module and looped through all of the mappings and printed original line/column and generated line/column here is what I got:
The first problem is that some of the source line/columns are missing and source-map module is parsing them as undefined.
Second problem is that source line/column pairs are not unique, so in this example you can see that (2, 4) is mapping to (9, 4), (9, 15) and so on.
This is a big problem and makes debugging and the whole build pipeline very difficult. Is there anything that can be done about this?
The text was updated successfully, but these errors were encountered: