Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Empty sourceRoot property in sourceMap causing source file to be expected in root of application #516

Closed
ChrisPearce opened this issue Jan 2, 2016 · 3 comments

Comments

@ChrisPearce
Copy link

I am testing using v1.0.0-alpha.2.

My source map (*.js.map) files are being generated by the TypeScript compiler, and the processed files (and the supporting map files) are all being output to the same directory (i.e. /lib) as the source files.

The generated sourceMap files have an empty sourceRoot.

When Istanbul sees the empty sourceRoot property, it then looks for the source files in the root of the application rather than at the location relative to the processed file or mapping file.

@gotwarlost
Copy link
Owner

Is there a github repo I can look at to reproduce the problem? These days my day job is keeping me super busy and I'm looking for problems to be handed to me on a platter. Sorry for being such a pain.

A cursory look at the istanbul source map code tells me that most of the work is being delegated to the source maps library.But if you can set things up for me that would be really helpful.

@gotwarlost
Copy link
Owner

I just pushed out a fix for #512 - this may fix your issue as well. Please try it and let me know.

jbinto added a commit to jbinto/thirtyone-server that referenced this issue Jan 9, 2016
@ChrisPearce
Copy link
Author

Many thanks.

Using istanbul-lib-source-maps v1.0.0-alpha.9 resolves this issue as well.

Are there any plans to release v1.0.0-alpha.9 to the main Istanbul repository (https://github.com/gotwarlost/istanbul) or should I just reference the https://github.com/istanbuljs/istanbul-lib-source-maps repository for the time being?

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

2 participants