Skip to content

Commit 545233c

Browse files
committed
Fix vite plugin auto gen when no types
1 parent b40cb54 commit 545233c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

apps/array/src/main/services/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
* Auto-import all IPC service types for declaration merging
33
* This file is auto-generated by vite-plugin-auto-services.ts
44
*/
5+
6+
export {};

apps/array/vite-plugin-auto-services.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ ${serviceFiles.map((f) => `import "./${f.replace(".ts", ".js")}";`).join("\n")}
3131
`;
3232

3333
// Generate types.ts (imports type files for declaration merging)
34+
const typesImports = typeFiles
35+
.map((f) => `import "./${f.replace(".ts", ".js")}";`)
36+
.join("\n");
3437
const typesContent = `/**
3538
* Auto-import all IPC service types for declaration merging
3639
* This file is auto-generated by vite-plugin-auto-services.ts
3740
*/
3841
39-
${typeFiles.map((f) => `import "./${f.replace(".ts", ".js")}";`).join("\n")}
42+
${typesImports || "export {};"}
4043
`;
4144

4245
// Check if content actually changed before writing

0 commit comments

Comments
 (0)