Must a sourcemap have a .map extension?

谁都会走 提交于 2019-12-02 03:44:18

问题


If I create a source map, must I give it a .map extension, or could I call it .foo, as long as it has the correct headers?

If someone could point to documentation on this, I would be most thankful!


回答1:


It can have any extension. In the compressed/minified/original file you put a sourceMappingUrl comment or SourceMap http header that tells the interpreter where to find the source map.

There's no true formal spec for source maps but this is the informal one: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit



来源:https://stackoverflow.com/questions/23549699/must-a-sourcemap-have-a-map-extension

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!