egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.49k stars 209 forks source link

error transfrom from ESM `export default` to CJS `module.exports` #992

Open LoTwT opened 10 months ago

LoTwT commented 10 months ago

issue

It will only transform export default to module.exports when

In other cases, it doesn't work.

reproduction

https://github.com/LoTwT/tsup-cjs-default-export-issue

The result is false.

The result is true.

Upvote & Fund

Fund with Polar

sxzz commented 10 months ago

Wait https://github.com/evanw/esbuild/issues/3281

segevfiner commented 8 months ago

So, put in other words, cjsInterop is broken ATM without splitting: true.

lvjiaxuan commented 6 months ago

So, put in other words, cjsInterop is broken ATM without splitting: true.

I dont know why. Fow now (ts@8.0.1), the cjsInterop doesn't work anyway with splitting be neither true or false.

xiaozhuai commented 2 months ago

Any progress here?