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

Inline source maps being request with path #17

Closed
auchenberg opened this issue Sep 17, 2015 · 2 comments
Closed

Inline source maps being request with path #17

auchenberg opened this issue Sep 17, 2015 · 2 comments

Comments

@auchenberg
Copy link
Contributor

This change 2004283#diff-a14450dbe613721f5b4d8361cc0e5ec0R244 has broken the inline source map support, as it causes the inline-source map to be fetched from the network with the base url prefixed.

Actual:
sourceMappingURL: "http://localhost:7000/sourcemapsexample/build/data:application/json;base64,eyJ2Z

Expected:
sourceMappingURL : "data:application/json;base64,e"

@auchenberg auchenberg changed the title Inline source map support broken Inline source maps being request with path Sep 17, 2015
@auchenberg
Copy link
Contributor Author

Change could be:

          var sourceMappingURL = _findSourceMappingURL(source)
          var isDataUrl = sourceMappingURL.substr(0, 5) === 'data:'

          if (sourceMappingURL[0] !== '/' && !isDataUrl) {
            sourceMappingURL = fileName.substring(0, fileName.lastIndexOf('/') + 1) + sourceMappingURL
          }

@eriwen
Copy link
Member

eriwen commented Sep 20, 2015

Fixed by #18

@eriwen eriwen closed this as completed Sep 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants