Example reproduction: https://replit.com/@probablyup/tsup-repro
I went deep and tested this in esbuild and rollup, I believe the odd behavior is coming from tsup.
Steps:
Run
dist/input.cjs.js
You'll see this output at the bottom which is invalid:
exports."design-system" = design_system;
It should be:
exports["design-system"] = design_system;
Additional replications:
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too