We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83b1cae commit c899448Copy full SHA for c899448
1 file changed
tsup.base.config.ts
@@ -115,7 +115,8 @@ const baseConfig: Options & {
115
// tsup@8.5.0 do not write to output atomically.
116
// Thus, when building in parallel, some of the files will be emptied.
117
// We are writing output to /dist.tmp/ and copy everything back to /dist/.
118
- onSuccess: 'mkdir -p ./dist/ && cp ./dist.tmp/* ./dist/',
+ // "onSuccess" runs before DTS, we need to wait until *.d.ts are emitted.
119
+ onSuccess: 'while [ ! -f ./dist.tmp/*.d.ts ]; do sleep 0.2; done; mkdir -p ./dist/ && cp ./dist.tmp/* ./dist/',
120
outDir: './dist.tmp/'
121
};
122
0 commit comments