-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Description
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:
/* for example, an inline sourcemap generated by Stylus */
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF..... */
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.
Metadata
Metadata
Assignees
Labels
No labels