Javascript Source Map

javascript - done reading

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/

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/

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