Closed lukebennett88 closed 11 months ago
I think Iβm going to silence this error outside of node16 (from ESM)
, since thatβs the only place it can cause a real issue. Since this is a dual package, real ESM in Node is going to see a real default export, while transpiled ESM will see a transpiled default export, and everything is consistent.
Sorry if this isn't the right place to raise this, but I'm having some troubles handling default exports in a dual CJS/ESM package. I'm using tsup in a real project and am seeing this error:
I've put together a reproduction here: https://github.com/lukebennett88/dual-package-example. My question is β how do I change my code to support this. Am I using
tsup
incorrectly? Do I need to change my source code? Is everything configured correctly, do I need a custom esbuild plugin?Hopefully this isn't too specific to
tsup
I'm happy to ask there instead if this is the wrong place π