In order to ease debugging, I'd like to publish typescript code alongside generated javascript code. The only way I find to turn on source map is to change tsconfig.lib.prod.json and set "declarationMap" to true. This results map files with absolute paths on my computer as follows:
"sourceRoot":"L:/xxx/yyy/projects/lib/src/","sources":["lib/alert/alert.service.ts"]
And when I run an app which consumes this library, this source map is somehow modified as follows, with another property called sourcesContent:
"sources":["../../../../../../../../yyy/projects/lib/src/lib/alert/alert.service.ts"], "sourcesContent": "(It's too long, I ignored it)"
which can't be used by vscode Go To Definition any more. (I use procmon.exe, and find node has done this change, and sourcesContent is the reason why Go To Definition can't work any more).
My question is, is there a better way to achieve my goal. Thank you guys a lot in advance.