microsoft / microsoft/TypeScript
Ability to extend compilerOptions's paths config
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
Suggestion
I have a tsconfig.base.json file for the monorepo, it defined paths that all project can use
{
"compileOnSave": false,
"compilerOptions": {
```
"paths": {
"@aegis/ui": ["libs/ui/src/index.ts"],
"@aegis/ui/*": ["libs/ui/src/*"],
"@aegis/shared": ["libs/shared/src/index.ts"],
"@aegis/shared/*": ["libs/shared/src/*"]
}
},
"exclude": ["node_modules", "tmp"]
}
Each project has own tsconfig.json, also defined paths that only for itself
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"paths": {
"@environment": ["src/environments/environment.ts"]
}
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./tsconfig.editor.json"
}
]
}
Unfortunately, the paths would be overwritten.
I have to add tsconfig.base.json paths item to each project.
So, it's necessary to provide a solution for this case.
🔍 Search Terms
- compilerOptions paths extends label:Suggestion
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
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
Es wird keine Quelldatei oder kein Test genannt. Beginne damit nachzuverfolgen, wie compilerOptions.paths von tsconfig.base.json in die tsconfig.json eines Projekts übernommen wird, und prüfe die Issue-Diskussion auf die erwartete Merge-Semantik. Erledigt ist die Aufgabe, wenn geerbte Pfadzuordnungen verfügbar bleiben und projektspezifische Zuordnungen hinzugefügt werden können, ohne die Basiskonfiguration zu wiederholen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100