我正在开发Python to JavaScript编译器,我尝试实现V3源图。
以下格式可以正常使用:
{
"version": 3,
"file": "D:/activ_tosh/geatec/transcrypt/transcrypt/demos/pong/__javascript__/pong.mod.js",
"sources": [
"D'!activ_tosh!geatec!transcrypt!transcrypt!demos!pong!pong.py"
],
"mappings": "AAAA;AAIA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AAOA;AACA;AAEA;AAAA;AACA;AAMA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AAEA;AAAA;AAEA;AAGA;AAQA;AACA;AACA;AAAA;AAAA;AAAA;AA/CA;AACA;AACA;AACA;AA8CA;AAAA;AAKA;AAEA;AAAA;AACA;AAMA;AAMA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAvCA;AACA;AAwCA;AAAA;AAKA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAHA;AAAA;AAAA;AAAA;AAKA;AAKA;AAOA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAHA;AAAA;AAAA;AAAA;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAvCA;AACA;AAwCA;AAAA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAAA;AAEA;AACA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"
}
但所谓的索引地图'格式在Chrome中出错:
Failed to parse SourceMap
我到处寻找例子,但没有找到。任何人都可以发现可能存在的问题,我的索引图是:
{
"version": 3,
"file": "D:/activ_tosh/geatec/transcrypt/transcrypt/demos/pong/__javascript__/pong.js",
"sections": [
{
"offset": {
"line": 15928,
"column": 0
},
"url": "file:///D:/activ_tosh/geatec/transcrypt/transcrypt/demos/pong/__javascript__/extra/sourcemap/pong.mod.js.map"
}
]
}
我已尝试使用和不使用' file:///'以及相对路径,但这个(非常无法提供的)错误仍然存在。我也尝试过Firefox devtools,但它们根本没有提供任何错误信息。