When clean: true, we basically glob **/* with our cwd set to dist.
If for whatever reason you have a symlink inside your dist directory, we currently follow it and remove whatever is on the other end.
In particular, anyone moving from tshy to tsup will hit this as tshy creates symlinks to your project directory in dist/. this means the first time you build using tsup, after previously using tshy, tsup removes itself (as it removes node_modules and everything else).
we should probably just remove the link rather than following it
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.
When
clean: true
, we basically glob**/*
with ourcwd
set todist
.If for whatever reason you have a symlink inside your
dist
directory, we currently follow it and remove whatever is on the other end.In particular, anyone moving from
tshy
totsup
will hit this as tshy creates symlinks to your project directory indist/
. this means the first time you build using tsup, after previously using tshy, tsup removes itself (as it removesnode_modules
and everything else).we should probably just remove the link rather than following it
Upvote & Fund