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

onSuccess async function in tsup.config.ts should wait until tsc has ran #856

Closed
alii opened this issue Mar 12, 2023 · 1 comment
Closed

Comments

@alii
Copy link

alii commented Mar 12, 2023

I need to copy some some files (namely copy .d.ts to .d.cts) and can't because tsup runs the onSuccess function inside the config file before tsc has had a chance to finish compiling types. It would make sense to run this after.

Also, the function is called onSuccess but there are plenty of reasons why tsc might fail at this point, meaning that onSuccess has ran even on failure.

My reasoning for this is for esm/cjs compatibility. Eventually it would be cool if tsup could properly spit out the correct files, but I'm having somewhat of a difficult time understanding what the correct should be anyway. JS ecosystem 😅

@alii
Copy link
Author

alii commented Mar 12, 2023

Closing as duplicate of #700

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