Skip to content

Commit 7c41227

Browse files
committedMar 10, 2025
fix: add default compiler options for bundling dts
1 parent 34ce2d4 commit 7c41227

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed
 

‎src/features/dts.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { NormalizedFormat, ResolvedOptions } from '../options'
1010
import { ExternalPlugin } from './external'
1111
import type { OutputExtension } from './output'
1212
import type { PackageJson } from 'pkg-types'
13+
import type { ScriptTarget } from 'typescript'
1314
import type { Options as IsolatedDeclOptions } from 'unplugin-isolated-decl'
1415

1516
const debug = Debug('tsdown:dts')
@@ -46,7 +47,19 @@ export async function bundleDts(
4647
plugins: [
4748
ExternalPlugin(options, pkg) as any,
4849
ResolveDtsPlugin(),
49-
DtsPlugin(),
50+
DtsPlugin({
51+
compilerOptions: {
52+
declaration: true,
53+
noEmit: false,
54+
emitDeclarationOnly: true,
55+
noEmitOnError: true,
56+
checkJs: false,
57+
declarationMap: false,
58+
skipLibCheck: true,
59+
preserveSymlinks: false,
60+
target: 99 satisfies ScriptTarget.ESNext,
61+
},
62+
}),
5063
],
5164
})
5265

0 commit comments

Comments
 (0)
Please sign in to comment.