源码映射的缓存
稳定性: 1 - 实验
如果找到,则源映射数据将附加到 JSON 覆盖对象上的顶层键 source-map-cache
。
source-map-cache
是一个对象,其中的键代表从中提取源映射的文件,其值包括原始源映射网址(在键 url
中)、解析的 Source Map v3 信息(在键 data
中)和行长度源文件(在键 lineLengths
中)。
{
"result": [
{
"scriptId": "68",
"url": "file:///absolute/path/to/source.js",
"functions": []
}
],
"source-map-cache": {
"file:///absolute/path/to/source.js": {
"url": "./path-to-map.json",
"data": {
"version": 3,
"sources": [
"file:///absolute/path/to/original.js"
],
"names": [
"Foo",
"console",
"info"
],
"mappings": "MAAMA,IACJC,YAAaC",
"sourceRoot": "./"
},
"lineLengths": [
13,
62,
38,
27
]
}
}
}
Stability: 1 - Experimental
If found, source map data is appended to the top-level key source-map-cache
on the JSON coverage object.
source-map-cache
is an object with keys representing the files source maps
were extracted from, and values which include the raw source-map URL
(in the key url
), the parsed Source Map v3 information (in the key data
),
and the line lengths of the source file (in the key lineLengths
).
{
"result": [
{
"scriptId": "68",
"url": "file:///absolute/path/to/source.js",
"functions": []
}
],
"source-map-cache": {
"file:///absolute/path/to/source.js": {
"url": "./path-to-map.json",
"data": {
"version": 3,
"sources": [
"file:///absolute/path/to/original.js"
],
"names": [
"Foo",
"console",
"info"
],
"mappings": "MAAMA,IACJC,YAAaC",
"sourceRoot": "./"
},
"lineLengths": [
13,
62,
38,
27
]
}
}
}