Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

sourceMapContents array is full of nulls #427

Closed
aniranc opened this issue Dec 13, 2015 · 3 comments
Closed

sourceMapContents array is full of nulls #427

aniranc opened this issue Dec 13, 2015 · 3 comments

Comments

@aniranc
Copy link

aniranc commented Dec 13, 2015

Reproducible example here: https://github.com/aniranc/systemjs-builder-sourceMapContents-min-failing

Looks like going through the source path normalizing (https://github.com/systemjs/builder/blob/master/lib/sourcemaps.js#L83) adds an extra ../ to the front, which causes both the attempted file read and the contentsBySource lookup to fail. Here's an example debugging session:

screen shot 2015-12-12 at 8 58 57 pm

Any reason the paths need to be normalized here? As far as I can see the solution is just to remove the normalization, but I'm not sure of what other implications that might have.

@guybedford
Copy link
Member

Thanks so much for the explanation and test case. I've fixed this in fdfa6a4.

@seangwright
Copy link

@guybedford just ran into this issue. My src/app bundle files get their contentSource correctly in the .js.map file but my jspm_packages/ bundle files have null for all the content.

I tried patching your fix into my builder code and it worked perfectly.

Thanks!

@guybedford
Copy link
Member

Released in 0.14.12.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants