Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[api-extractor] Allow configuration of external packages

Đang mở
#5,470 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
6.5k
Fork
708
Merge trung bình
4 ngày 13 giờ
Pull request đã merge (30 ngày)
62

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/rushstack

Tất cả issue của microsoft/rushstack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.