TypeScript Version: 3.0.1
Search Terms: sourceroot, maproot, sourceMappingURL
Code
// tsconfig.json
{
"compilerOptions": {
"sourceMap": true,
"outDir": "js/",
"mapRoot": "js/",
"sourceRoot": "sources/"
}
}
// sources/index.ts
"Hello world!";
Expected behavior: It should generate a valid path.
Actual behavior:
"Hello world!";
//# sourceMappingURL=../sources/js/index.js.map
Related Issues: I think #23989 caused this, as 2.9.2 generates a valid (but absolute) path:
"Hello world!";
//# sourceMappingURL=(absolute path)/js/index.js.map
Workaround?: Modifying tsconfig seems to be generate valid paths, but then VS2017 (15.8.1) fail to map the file.
{
"compilerOptions": {
"sourceMap": true,
"outDir": "js/",
"sourceRoot": "../sources/"
}
}
"Hello world!";
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"../sources/","sources":["index.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAA
TypeScript Version: 3.0.1
Search Terms: sourceroot, maproot, sourceMappingURL
Code
Expected behavior: It should generate a valid path.
Actual behavior:
Related Issues: I think #23989 caused this, as 2.9.2 generates a valid (but absolute) path:
Workaround?: Modifying tsconfig seems to be generate valid paths, but then VS2017 (15.8.1) fail to map the file.
{ "compilerOptions": { "sourceMap": true, "outDir": "js/", "sourceRoot": "../sources/" } }{"version":3,"file":"index.js","sourceRoot":"../sources/","sources":["index.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAA