A JSON file representing a source map. The code contains:
{
"version": 3, // Always the integer 3
"file": "out.js", // Optional: name of the generated file
"sourceRoot": "", // Optional: prefix prepended to each entry in "sources"
"sources": ["foo.js", "bar.js"], // Required: list of original source URLs/paths (or null)
"sourcesContent": [null, null], // Optional: inlined source text, aligned with "sources"
"names": ["src", "maps"], // Optional: symbol names referenced by "mappings"
"mappings": "A,AAAB;;ABCDE", // Required: encoded mapping data (base64-VLQ deltas)
"ignoreList": [0] // Optional: indexes into "sources" considered "third-party"
}
Source maps are a vital part of modern web development, but the lack of a standard made it impossible for us to add new features or improve the debugging experience.
This is the story of how we standardized source maps and how we continue to ship features through standards 📜
🧵