Javascript Source Map

javascript

http://blog.teamtreehouse.com/introduction-source-maps - done reading
https://blog.sentry.io/2015/10/29/debuggable-javascript-with-source-maps.html

We indicates to the browser that a source map is available by adding a special comment to the bottom of our optimized file:

//# sourceMappingURL=/path/to/script.js.map

This comment will usually be added by the program that was used to generate the source map. The developer tools will only load this file if support for source maps has been enabled and the developer tools are open. We can also specify that a source map is available by sending the X-SourceMap HTTP header in the response for the compressed JavaScript file:

X-SourceMap: /path/to/script.js.map

The source map file contains a JSON object with information about the map itself and the original JavaScript files.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License