microsoft / microsoft/TypeScript
Tsconfig option to disable .tsx extension lookup in module resolution
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
Running tsc --traceResolution in my project I found that Typescript was looking up .tsx files for every module resolution. That's very inconvenient, first because .tsx extension serves a very specific domain, second because by elliminating hundreds or maybe thousands of (think of a really big project) unecessary stat() syscalls the build time would probably speed up a bit, or maybe considerably.
🔍 Search Terms
- tsx
- module resolution
✅ Viability Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
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 mit tsc --traceResolution, um die aktuellen Sonden der Modulauflösung für .tsx-Dateien zu beobachten. Verfolge die Einstiegspunkte der Modulauflösung und ermittle, wie eine tsconfig-Option diese Sonden steuern würde, ohne bestehende Standardwerte zu ändern. Als abgeschlossen gilt die Aufgabe, wenn die Option bei Aktivierung die Suche nach .tsx unterdrückt, während die normale Auflösung ansonsten unverändert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100