Skip to content

Commit

Permalink
Make sourceURL unique (#44)
Browse files Browse the repository at this point in the history
The [sourceMap 3 sepcification](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit) mentions
sourceURL is described [here](http://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/)
, which mentions that
> The name has to uniquely identify the buffer

Where `map.file` is currently not, so for example if I have multiple `style.scss` files in my project,
clicking on chrome's inspector's diplayed filename will always take me to some specific one and not the correct one.
( mabye the first one, not sure. )
  • Loading branch information
yurynix authored and koistya committed Sep 23, 2016
1 parent 3d3bc70 commit fb0db41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/insertCss.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function insertCss(styles, options) {
if (sourceMap) {
cssText += `\n/*# sourceMappingURL=data:application/json;base64,${
b64EncodeUnicode(JSON.stringify(sourceMap))}*/`;
cssText += `\n/*# sourceURL=${sourceMap.file}*/`;
cssText += `\n/*# sourceURL=${id}*/`;
}

if ('textContent' in elem) {
Expand Down

0 comments on commit fb0db41

Please sign in to comment.