[api-extractor] Allow configuration of external packages
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- typescript
- Bereich
- tooling
Rechercherichtung
Start with the external-module detection logic in apps/api-extractor/src/analyzer/ExportAnalyzer.ts, especially the linked lines, and trace how the existing option for additionally included packages is configured. Review the API Extractor configuration path before deciding how string or regex matching should be represented. Done means imports matching the configured external packages remain external instead of being crawled and bundled.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
I am having a monorepo setup where some files are included via code sharing (using typescript path mappings).
In such a setup API extractor detects the imported files from the other projects as internal and tries to crawl and bundle them into the final types and API.
But according to my build setup the imported files will be external references in the final output.
To mitigate this problem I want to tell API extractor somehow that these imports are external modules.
Details
- API extractor detects the external modules here: https://github.com/microsoft/rushstack/blob/f1bdeddfc0abcc987fdfe0b4d1e82f1ea2b4f65f/apps/api-extractor/src/analyzer/ExportAnalyzer.ts#L264-L313
- There is already an option to additionally include packages
- There is no option to force an import to be an external module.
Bundlers like Rollup/Rolldown have dedicated options like: https://rollupjs.org/configuration-options/#external to control the externals. I think a similar string+regex option could solve this.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/api-extractor version? |
7.53.1 |
| Operating system? | Wom |
| API Extractor scenario? | rollups (.d.ts) --> |
| Would you consider contributing a PR? | Yes |
| TypeScript compiler version? | 5.9.3 |
Node.js version (node -v)? |
v24.11.0 |
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.5k
- Forks
- 708
- Ø Merge
- 4 T. 7 Std.
- Gemergte PRs (30 T.)
- 61
Entwicklungsumgebung
Die Einrichtungsdateien dieses Projekts haben wir noch nicht geprüft. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/rushstack
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
microsoft/rushstack#5971 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
microsoft/rushstack#5902 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/rushstack#5839 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
microsoft/rushstack#5683 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/rushstack
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
melgarafael/DeskcommCRM#1812 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
prisma/prisma-cli#309 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
gregwebs/pi-quota-dispatcher#26 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
openwatersio/slackwater.xyz#124 ·
Maintainer antworten meist innerhalb von 1 Tag
-
agent-reported area/browser area/docs documentation good first issue hacktoberfest help wanted P2
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 2 Tagen