microsoft / microsoft/TypeScript
Add an option to force source maps to use absolute paths?
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Previous related issue: https://github.com/Microsoft/TypeScript/issues/23180
It seems VS2017 is incompatible with relative paths, when debugging a UWP app now tries to load source maps from the app URI and the host does not support it.
'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/3.0)'.
SourceMap ms-appx://6b826582-e42b-45b9-b4e6-dd210285d94b/js/require-config.js.map read failed: The URI prefix is not recognized..
Hard-coding the full path in tsconfig.json is not a good idea here, I hope we have an option to behave as 2.9.2 so that we can get the auto-resolved full path.
Edit: My tsconfig.json that works in TS2.9 but not in TS3.0:
{
"compilerOptions": {
"strict": true,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es2017",
"outDir": "js/",
"mapRoot": "js/",
"sourceRoot": "sources/",
"emitBOM": true,
"module": "amd",
"moduleResolution": "node"
},
"exclude": [
"node_modules",
"wwwroot"
]
}
My failed trial to fix this: (removed mapRoot and changed sourceRoot)
{
"compilerOptions": {
"strict": true,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es2017",
"outDir": "js/",
"sourceRoot": "../sources/",
"emitBOM": true,
"module": "amd",
"moduleResolution": "node"
},
"exclude": [
"node_modules",
"wwwroot"
]
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず関連する issue と報告された tsconfig の例を確認し、次に TypeScript が source map を出力し、mapRoot と sourceRoot を解決する仕組みを追跡します。報告された UWP デバッグケースについて、あるオプションで TypeScript 2.9.2 の絶対パスの動作を再現でき、関連する source-map 出力をカバレッジで網羅できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100