Skip to content

Commit 6a61df0

Browse files
authored
fix: include all source files for type declaration (#117)
* fix: include all source files for type declaration * chore: add changeset
1 parent ea6e9a4 commit 6a61df0

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/funny-moose-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@strapi/sdk-plugin': patch
3+
---
4+
5+
include all source files for type declaration

src/cli/commands/utils/build/vite-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export async function createViteConfig(options: ViteConfigOptions): Promise<Inli
117117
tsconfigPath,
118118
outDir: typesDir,
119119
// Only emit declarations for the entry file
120-
include: [bundle.source],
120+
include: [path.join(path.dirname(bundle.source), '**/*')],
121121
// Don't bundle types into a single file
122122
rollupTypes: false,
123123
// Clean output to ensure consistent structure

0 commit comments

Comments
 (0)