Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-extractor]: TS paths aliases force bundling cross package definitions when rolluping dts #3443

Open
Hotell opened this issue Jun 3, 2022 · 0 comments

Comments

@Hotell
Copy link

Hotell commented Jun 3, 2022

Summary

We wanna leverage stripping @internal APIs from rolluped dts definition by leveraging publicTrimmedFilePath config. Unfortunately things doesn't work as one would expect.

Actual
When TS Paths aliases are used, cross package type declarations are always inlined(bundled), although there is no bundledPackages being applied.

Expected
No matter if yarn workspaces/lerna/symlink resolution or TS path aliases is applied within monorepo to resolve absolute package paths, api-extractor should not inline(bundle) cross package type definitions.

Repro steps

Link to whole repro

Steps:

  1. run yarn build
  2. check output:

check packages/one/dist/public.d.ts:

issues with rolluping API for package/one

check packages/two/dist/public.d.ts:

ssues with rolluping API for package/one

  • internalOne has been stripped as expected (re-export from a different within repo package API)
  • 🐛 inlined Baseball and Hello from @org/two package (re-export from a different within repo package ) - should have been only re-export of Baseball !

Details

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.24.2
Operating system? Linux/Mac
API Extractor scenario? rollups (.d.ts)
Would you consider contributing a PR? Maybe
TypeScript compiler version? 4.6.4
Node.js version (node -v)? 14.8.1
@Hotell Hotell changed the title [api-extractor]: TS path aliases forces bundling cross package definitions [api-extractor]: TS paths aliases forces bundling cross package definitions Jun 3, 2022
@Hotell Hotell changed the title [api-extractor]: TS paths aliases forces bundling cross package definitions [api-extractor]: TS paths aliases forces bundling cross package definitions when rolluping dts Jun 3, 2022
@Hotell Hotell changed the title [api-extractor]: TS paths aliases forces bundling cross package definitions when rolluping dts [api-extractor]: TS paths aliases force bundling cross package definitions when rolluping dts Jun 3, 2022
@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Feb 26, 2024
@iclanton iclanton moved this from Needs triage to AE/AD in Bug Triage Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: AE/AD
Development

No branches or pull requests

1 participant