Skip to content

Commit fb0db41

Browse files
yurynixkoistya
authored andcommitted
Make sourceURL unique (kriasoft#44)
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. )
1 parent 3d3bc70 commit fb0db41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/insertCss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function insertCss(styles, options) {
8282
if (sourceMap) {
8383
cssText += `\n/*# sourceMappingURL=data:application/json;base64,${
8484
b64EncodeUnicode(JSON.stringify(sourceMap))}*/`;
85-
cssText += `\n/*# sourceURL=${sourceMap.file}*/`;
85+
cssText += `\n/*# sourceURL=${id}*/`;
8686
}
8787

8888
if ('textContent' in elem) {

0 commit comments

Comments
 (0)