You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using tsup for almost all my projects during the past year. I really enjoy the DX and minimal configuration it offers. Thanks so much for this awesome project.
However, the dropping of code splitting for CJS in v5.0 via #403, could be a huge obstacle to me. Giving that the ecosystem is still quite far from taking ESM-only packages, shipping CJS along with ESM seems to be a good transition approach (and this is one of the sweet points of tsup). It could be a common practice to expose some submodules we some reusable logic with the main package, for example, https://github.com/antfu/unplugin-icons/blob/main/src/vite.ts, the lack of CJS code-splitting make all submodules contain the full package content, which will not only make the usage costly but also break functionalities like internal sharing variables.
I do understand the limitation of CJS code-splitting and the reason for dropping it, but I hope this could be somehow delayed by making it disabled by default but able to opt-in optionally. Until the ecosystem catches up, or esbuild implements the naive code-splitting for CJS.
Thanks.
The text was updated successfully, but these errors were encountered:
I have been using
tsup
for almost all my projects during the past year. I really enjoy the DX and minimal configuration it offers. Thanks so much for this awesome project.However, the dropping of code splitting for CJS in v5.0 via #403, could be a huge obstacle to me. Giving that the ecosystem is still quite far from taking ESM-only packages, shipping CJS along with ESM seems to be a good transition approach (and this is one of the sweet points of
tsup
). It could be a common practice to expose some submodules we some reusable logic with the main package, for example, https://github.com/antfu/unplugin-icons/blob/main/src/vite.ts, the lack of CJS code-splitting make all submodules contain the full package content, which will not only make the usage costly but also break functionalities like internal sharing variables.I do understand the limitation of CJS code-splitting and the reason for dropping it, but I hope this could be somehow delayed by making it disabled by default but able to opt-in optionally. Until the ecosystem catches up, or esbuild implements the naive code-splitting for CJS.
Thanks.
The text was updated successfully, but these errors were encountered: