-
Notifications
You must be signed in to change notification settings - Fork 322
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
Sourcemap tracker fails when input sourcemap is data URI (inline) #599
Comments
I wrote a patch that implements the fix: I didn't write any tests, though. If you want to merge this, I can look into making some tests. |
jakubpawlowicz
pushed a commit
that referenced
this issue
Jun 16, 2015
Enables ingestion of inline, data-uri source maps.
jakubpawlowicz
pushed a commit
that referenced
this issue
Jun 22, 2015
Enables ingestion of inline, data-uri source maps.
jakubpawlowicz
added a commit
that referenced
this issue
Jun 23, 2015
Fixes #599 - inlined source maps.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In "input-source-map-tracker.js", it automatically locates the
/*#sourceMappingURL=
in the input .css file (very cool!) but does not account for the possibility that the URL is a data URI:https:/jakubpawlowicz/clean-css/blob/master/lib/utils/input-source-map-tracker.js#L71-L73
It attempts to read this file off disc:
/path/to/source/data:application;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF.....
which throws an
ENAMETOOLONG
error.I think a fix is fairly simple. Add a dependency on a data URI parsing library. Check the sourceMapFile against a data URI regexp, perhaps
/^data:/
. If it matches the regexp, parse it as a data URI. Otherwise keep the current behavior: reading a file off disc.The text was updated successfully, but these errors were encountered: