Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[api-extractor] Allow configuration of external packages

Open
#5,470 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
tooling

Research direction

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.

Written by the indexing model from the issue text.

Description

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

  1. API extractor detects the external modules here: https://github.com/microsoft/rushstack/blob/f1bdeddfc0abcc987fdfe0b4d1e82f1ea2b4f65f/apps/api-extractor/src/analyzer/ExportAnalyzer.ts#L264-L313
  2. There is already an option to additionally include packages
  3. 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
Dominant language
TypeScript
Stars
6.5k
Forks
708
Avg merge
4d 13h
Merged PRs (30d)
62

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/rushstack

All issues in microsoft/rushstack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.