We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c022ae7 commit bafa0adCopy full SHA for bafa0ad
packages/plugin-react/tsdown.config.ts
@@ -14,7 +14,13 @@ export default defineConfig({
14
],
15
outputOptions(outputOpts, format) {
16
if (format === 'cjs') {
17
- outputOpts.footer = 'module.exports.default = module.exports'
+ outputOpts.footer = (chunk) => {
18
+ // don't append to dts files
19
+ if (chunk.fileName.endsWith('.cjs')) {
20
+ return 'module.exports.default = module.exports'
21
+ }
22
+ return ''
23
24
}
25
return outputOpts
26
},
0 commit comments