You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `dts` plugin accepts the following configuration options:
56
+
57
+
```ts
58
+
dts(entryPoint, options)
59
+
```
60
+
61
+
| Option | Type | Default | Description |
62
+
|--------|------|---------|-------------|
63
+
|`cwd`|`string`| Current directory | The directory where the plugin will look for the `tsconfig.json` file. |
64
+
|`dtsInput`|`boolean`|`false`| When entries are `.d.ts` files (instead of `.ts` files), this option should be set to `true`. If enabled, the plugin will skip generating a `.d.ts` file for the entry point. |
65
+
|`emitDtsOnly`|`boolean`|`false`| When `true`, the plugin will only emit `.d.ts` files and remove all other chunks. Useful when generating `d.ts` files for CommonJS format as part of a separate build process. |
66
+
|`tsconfig`|`string \| boolean`|`"tsconfig.json"`| The path to the `tsconfig.json` file. When set to `false`, any `tsconfig.json` file will be ignored. |
67
+
|`compilerOptions`|`object`|`{}`| The `compilerOptions` for the TypeScript compiler. See [TypeScript compiler options](https://www.typescriptlang.org/docs/handbook/compiler-options.html). |
68
+
|`isolatedDeclarations`|`boolean \| object`|`false`| When `true`, the plugin will generate `.d.ts` files using `oxc-transform`, which is much faster than the TypeScript compiler. This option is enabled automatically when `isolatedDeclarations` in `compilerOptions` is set to `true`. |
69
+
|`sourcemap`|`boolean`|`false`| When `true`, the plugin will generate declaration maps (`.d.ts.map` files) for `.d.ts` files. |
70
+
|`resolve`|`boolean \| (string \| RegExp)[]`|`false`| Resolve external types used in `.d.ts` files from `node_modules`. Can be a boolean or an array of strings/RegExp patterns. |
71
+
|`resolvePaths`|`boolean`|`false`| When `true`, the plugin will resolve `paths` in `tsconfig.json`. This option is enabled automatically when `paths` is set in `compilerOptions`. |
0 commit comments