Open Josmithr opened 3 months ago
@octogonz I looked briefly into your suggestion to modify _fetchAstImport
to track the most-public export that references a given import, but it doesn't appear that there is sufficient to get that information at that layer in the system. Seems like this needs further design consideration. Happy to contribute to this, but I think it merits deeper consideration before I proceed any further.
Currently, neither generated rollups nor API report "variants" trim their imports to only those referenced by their "trimmed" exports. This results in unnecessary file bloat in both cases, and unnecessary noise in the case of API reports (e.g., reports change when unused imports change, even when there are no export changes).
For a repro of the issue, see here: https://github.com/Josmithr/api-extractor-playground/tree/import-trimming-issue
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?