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

TSUP seems to be ignoring the minify: false and splitting: false options in some cases #1093

Open
maxpatiiuk opened this issue Mar 7, 2024 · 1 comment

Comments

@maxpatiiuk
Copy link

maxpatiiuk commented Mar 7, 2024

TSUP seems to be ignoring the minify: false and splitting: false options in some cases

Description of the issue:
https://github.com/maxpatiiuk/tsup-config-reproduction?tab=readme-ov-file#bugs

Minimal reproducible code:
https://github.com/maxpatiiuk/tsup-config-reproduction?tab=readme-ov-file#replication

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@maxpatiiuk
Copy link
Author

maxpatiiuk commented Mar 8, 2024

To clarify, the chunk splitting is causing issues in my application because it causes TypeScript to include import(somePath).SomeType statements in my .d.ts files when I export a type that's coming from a tsup-built library.
But somePath is a TSUP's dynamically generated chunk file, and so not covered by my package.json's "exports" field, and thus not resolvable.
My workaround was to add "./*": "./dist/*", in my package.json's exports, but that pretty much defeats the isolation benefits of the "exports" field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant