Closed 0x-jerry closed 7 months ago
I have took a look at the source code, it seems the dts task executed before main task, but the main task only checked dts
option.
https://github.com/egoist/tsup/blob/d8a203c6617afe7d3fa7fe211c4182538b0acad6/src/index.ts#L294-L306
Reproduce: https://stackblitz.com/edit/vitejs-vite-q3cget?file=package.json
When run![image](https://github.com/egoist/tsup/assets/14226737/026a59ad-cfe6-4c76-b03f-6127c7a17c8c)
pnpm run build (tsup src/main.ts --experimental-dts main --format esm
), it works well. The generate result is:But when run![image](https://github.com/egoist/tsup/assets/14226737/17a9053c-94a5-4a3b-9409-553197c0ec34)
pnpm run build-with-clean (tsup src/main.ts --experimental-dts main --format esm --clean
), it will not generate dts files. The generate result is: