Open tmkx opened 6 months ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
tsup | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 29, 2024 9:02am |
@sxzz Aby updates on this?
Hmmm, can we just enable spiltting automatically if cjsInterop
is enabled because of the problem https://github.com/egoist/tsup/pull/1056#discussion_r1582460208? And add the notice to the docs
splitting
with cjs has edge cases: https://github.com/egoist/tsup/issues/255
esbuild does not provide an exports metadata when the format is
cjs
.splitting
is working because it's also bundled as esm https://github.com/egoist/tsup/blob/fb4c2b6e75e29c58956eaaa6afab12b130accb14/src/esbuild/index.ts#L164-L165 and then transformed to cjs: https://github.com/egoist/tsup/blob/7000c8b6f5e69b801754a1846844cfc966f84571/src/plugins/cjs-splitting.ts#L21-L31