Closed RobinTail closed 2 months ago
This change broke my build, @sxzz : https://github.com/sxzz/tsdown/commit/1a5c7b5#diff-d74501d769f127f90b8a5b10d33c203821992409d1c2e3867a28548ccb0f2c8f
I'm having "type": "module" in my package.json, and my dist is now having .mjs file containing CommonJS and .js file having ESM.
"type": "module"
package.json
dist
.mjs
.js
https://github.com/sxzz/tsdown/blob/1a5c7b5470b7e8ff24a50f8f42d1a79c8bc8598a/src/features/output.ts#L14-L19
The line 19, I belive, should be
19
return moduleType === 'module' ? 'cjs' : 'js'
Similar problem with declaration files. Having type: module the files should be .d.ts for ESM and d.cts for CommonJS, but it's .d.ts and .d.mts now
type: module
.d.ts
d.cts
.d.mts
Try v0.2.13
Thank you so much, @sxzz It's fixed!
This change broke my build, @sxzz : https://github.com/sxzz/tsdown/commit/1a5c7b5#diff-d74501d769f127f90b8a5b10d33c203821992409d1c2e3867a28548ccb0f2c8f
I'm having
"type": "module"
in mypackage.json
, and mydist
is now having.mjs
file containing CommonJS and.js
file having ESM.https://github.com/sxzz/tsdown/blob/1a5c7b5470b7e8ff24a50f8f42d1a79c8bc8598a/src/features/output.ts#L14-L19
The line
19
, I belive, should beSimilar problem with declaration files. Having
type: module
the files should be.d.ts
for ESM andd.cts
for CommonJS, but it's.d.ts
and.d.mts
now