When I installed tsup@^5.6.0
and compiler format set cjs
. my compiled file content is like:
var example = __toModule(require('example'))
example.abc()
but now, I used tsup@^5.11.12
and same compiler format. my compiled file content is like:
var example = __toESM(require('example'))
example.default.abc()
now, run this file will thorw error like: TypeError: Cannot read property 'abc' of undefined
.
I saw evanw/esbuild#1897 this link and I fined esbuild version difference.
so, I downgrade to tsup@^5.6.0
fix this probrom. and what other solution can fix this?
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