Reputation: 836
Suppose that there is a js file with source-map in subdirectory of a html file.
then which is the sourceMappingURL comment of myjs.js ?
//# sourceMappingURL=myjs.js.map
or
//# sourceMappingURL=js/myjs.js.map
Upvotes: 13
Views: 4776
Reputation: 505
I lookup to the specification.
When the source mapping URL is not absolute, then it is relative to the generated code’s “source origin”. The source origin is determined by one of the following cases:
So if you use <script src="js/myjs.js">
in index.html the js/myjs.js.map
is used.
Upvotes: 11