-
-
Notifications
You must be signed in to change notification settings - Fork 42
excluded field for genereted d.ts files #212
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Clear and concise description of the problem
Generating .d.ts for every entry (e.g. hundreds of icons) is unnecessary and slows the build. tsconfig exclude does not help when those files are still listed as entry points.
Suggested solution
Add a way to skip declaration emit for paths matching globs
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: ['src/**/*.ts', 'src/Icon/Icons/**/index.js'],
outDir: 'lib',
unbundle: true,
root: 'src',
dts: {
tsconfig: 'tsconfig.build.json',
resolver: 'oxc',
exclude: ['src/Icon/Icons/**'], // <- this add
},
})This would mirror the ergonomics of vite-plugin-dts, which supports include / exclude on the plugin options.
Alternative
Split into two configs: one with dts: { ... }, one with dts: false for the same entries subset.
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request