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

Incorrectly resolves absolute source mapping url as relative to file #84

Open
rbuckton opened this issue Jun 25, 2015 · 1 comment
Open

Comments

@rbuckton
Copy link

The supportRelativeURL function always assumes mappings are relative, even when they may be an absolute URI.

Given:

  • Build 0.3.2 of source-map-support
  • a file of c:\dir\a.min.js
  • a url of file:///C:/dir/a.js

The result is C:\dir\file:\C:\dir\a.js when it should be C:\dir\a.js.

The issue stems from the fact node's path.resolve function does not interpret file URIs.

@technomage
Copy link

This is also the case when source maps contain sourceRoot with a protocol such as cog://NB with file 'Test' should display as cog://NB.Test for the displayed file but instead resolves with local file prefix and drops the // resulting in /working/directory/cog:/NB.Test

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.

2 participants