Open
Description
Reproduction link or steps
Migrated from tsup with npx tsdown migrate
- worked well but I ran into one issue:
tsup --external react
ESM dist/context.mjs 603.00 B
vs
tsdown --external react
ℹ dist/context.mjs 13.53 kB │ gzip: 4.03 kB
Locally I fixed it with --external '/react/'
:
ℹ dist/context.mjs 0.79 kB │ gzip: 0.43 kB
Unfortunately that workaround with /react/
breaks my github pipeline as it hangs until timeout
maybe because react
is part of the repository name?
jantimon/react-swc-suspense-tracker#4
Finally I fixed it with --external '/^react/'
:
ℹ dist/context.mjs 0.79 kB │ gzip: 0.43 kB
What is expected?
tsdown --external react
should do the same as tsup --external react
What is actually happening?
tsup --external react
added a lot of additional code to my dist file
Any additional comments?
No response