JavaScript Source Map

It is an independent map file, in the same directory as the source code

JavaScript scripts are becoming more and more complex. Most of the source code (especially various function libraries and frameworks) have to be converted before they can be put into the production environment.

What is Source map

Simply put, a source map is an information file in which location information is stored. In other words, each position of the converted code corresponds to the position before the conversion.

Open the Source map file, it looks like this:

  {
    version : 3,
    file: "out.js",
    sourceRoot : "",
    sources: ["foo.js", "bar.js"],
    names: ["src", "maps", "are", "fun"],
    mappings: "AAgBC,SAAQ,CAAEA"
  }

http://www.ruanyifeng.com/blog/2013/01/javascript_source_map.html

Guess you like

Origin blog.csdn.net/nmj2008/article/details/115323415