microsoft / microsoft/TypeScript
Add an option to force source maps to use absolute paths?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
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"
]
}
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando l’issue correlata e gli esempi di tsconfig segnalati, quindi traccia il modo in cui TypeScript emette le source map e risolve mapRoot e sourceRoot. Il lavoro è completo quando un’opzione può riprodurre il comportamento con percorsi assoluti di TypeScript 2.9.2 per il caso di debug UWP segnalato, con una copertura per l’output di source map pertinente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- compilers, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100