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 8fc5acc commit 22f02f2Copy full SHA for 22f02f2
packages/plugin-react-swc/tsdown.config.ts
@@ -23,7 +23,13 @@ export default defineConfig({
23
],
24
outputOptions(outputOpts, format) {
25
if (format === 'cjs') {
26
- outputOpts.footer = 'module.exports.default = module.exports'
+ outputOpts.footer = (chunk) => {
27
+ // don't append to dts files
28
+ if (chunk.fileName.endsWith('.cjs')) {
29
+ return 'module.exports.default = module.exports'
30
+ }
31
+ return ''
32
33
}
34
return outputOpts
35
},
0 commit comments