microsoft / microsoft/TypeScript
compilerOptions.paths to support relative and absolute paths
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
TypeScript Version: 2.0.2
Code
{
"compilerOptions": {
"paths": {
"./moment": ["node_modules/moment/moment.d.ts"],
"/foo/bar/baz": [ "some/other/path/for/compiler"]
}
},
Expected behavior:
I expect (need) to be able to redirect the compiler for any module, not just 'non relative' paths. I'm deploying to a runtime environment that requires me to use relative or absolute paths, but I need the compiler to look to different locations when building locally.
Actual behavior:
The compiler seems to ignore any compilerOption.paths setting which starts with / or ./
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem mit der bereitgestellten compilerOptions.paths-Konfiguration und den relativen und absoluten Modulschlüsseln zu reproduzieren. Verfolge den Einstiegspunkt der path-resolution des Compilers, um zu ermitteln, warum diese Schlüssel ignoriert werden. Fertig ist die Aufgabe, wenn relative und absolute Pfade wie beschrieben umgeleitet werden und das bestehende Verhalten für nicht-relative Pfade intakt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100