Closed csantos1113 closed 1 year ago
Reading this piece of Rollup documentation: https://rollupjs.org/guide/en/#outputinterop it says:
Note that the default mode of
"default"
mimics NodeJS behavior and is different from TypeScript esModuleInterop. To get TypeScript's behavior, explicitly set the value to"auto"
. In the examples, we will be using the CommonJS format, but the choice of interop similarly applies to AMD, IIFE and UMD targets as well.
So I wonder if we should add interop: 'auto'
here 👇
https://github.com/egoist/tsup/blob/31b2e7261fa84c41b0673c36bf7c7133dcbbda11/src/plugins/tree-shaking.ts#L46-L51
:tada: This issue has been resolved in version 6.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Here is a simplified version of my react code:
The generated CJS file with tsup
v6.3.0
was working ✅The generated CJS file with tsup
v6.4.0
isn't working ⚠️Do you know if there is additional rollup configuration I need to pass to have rollup resolving
default
exports properly?Originally posted by @csantos1113 in https://github.com/egoist/tsup/issues/749#issuecomment-1375931081
Upvote & Fund