-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge all d.ts files into a single d.ts file? #55
Comments
I recommend you using @microsoft/api-extractor to merge d.ts files into a single file, it's well at this work so that I don't want to make duplicate. The |
I would also really love to have this feature. Vite outputs a single API Extractor looks rather complicated to use, and it's also not clear to me how to embed it into the build process in such a way that only a single |
As far as I understand from API Extractor docs, it can't be used as it needs single *.d.ts as entrypoint and output of vite-plugin-dts does not contain such entry point. Same limit has most of the dts bundlers. I found only one which did not required dts entry point, but it takes tsconfig.json so it does not understand vue 😭 I didn’t find any working solution so far. 😢 |
use rollup + rollup-plugin-dts , but there will be problems when it is used with vite. |
it work for me pnpm exec tsup .\src\index.ts --dts-only |
Eventually, I wrote my own code to achieve |
This is the config I use to get a single index.d.ts will all declarations merged: plugins: [
dts({
include: ['src'],
staticImport: true,
insertTypesEntry: true,
rollupTypes: true,
}),
], |
Is it possible to merge all d.ts files into a single d.ts file?
The text was updated successfully, but these errors were encountered: