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

Source-maps source path is wrong #54

Closed
vzaidman opened this issue Nov 12, 2015 · 8 comments · Fixed by #61
Closed

Source-maps source path is wrong #54

vzaidman opened this issue Nov 12, 2015 · 8 comments · Fixed by #61

Comments

@vzaidman
Copy link

when babeling a simple es6 file exactly like in the example,
the "sources" property of the ".map" file is it's name instead of path.

so if you have two files with the same name they will collide in the "sources" directory when debugging.

vzaidman added a commit to welldone-software/gulp-babel that referenced this issue Nov 12, 2015
@timjchin
Copy link

Ran into the same issue, we weren't seeing any folder information in the sourcemaps, and @vzaidman's commit above (ad5f6c5) fixed it. 👍

@glen-84
Copy link

glen-84 commented Nov 19, 2015

@sindresorhus Could you please apply this fix? Otherwise we can't use sourcemaps. 😞

@vzaidman
Copy link
Author

its a temporary fix, i wouldn't recommend using it.
the fix should be somewhere deeper. (in the preset i think)
I tried to fix it myself but its really complecated

@glen-84
Copy link

glen-84 commented Nov 19, 2015

Right, I should have said "please fix this" instead of "please apply this fix". 😄

@clarkmalmgren
Copy link

I am seeing the same issue. @vzaidman's fix worked for me. Not sure why it is considered temporary.

@vzaidman
Copy link
Author

look at the code.
replaceExt changes source map's pathes to filenames and then we change it back instead of replaceExt setting the pathes right.

@clarkmalmgren
Copy link

So the problem was not in the renaming of the file but not in explicitly setting the source. I kept the replaceExt(...) line and just added a line to keep the source file name mapping correct. Submitting a pull request.

@vzaidman
Copy link
Author

I disagree.
The maps' source should not be changed and then changed again. They has to be set right inside the applySourceMap function.

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

Successfully merging a pull request may close this issue.

4 participants