Open maxpatiiuk opened 3 months ago
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
TSUP seems to be ignoring the
minify: false
andsplitting: false
options in some casesDescription 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