Skip to content

Commit b87cd8a

Browse files
authored
fix(start): extend api router schema to allow vite plugins (#2436)
1 parent bed07a1 commit b87cd8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/start/src/config/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ const routersSchema = z.object({
192192
api: z
193193
.object({
194194
entry: z.string().optional(),
195+
vite: viteSchema.optional(),
195196
})
196197
.optional(),
197198
})
@@ -314,7 +315,7 @@ export function defineConfig(
314315
routes: tsrFileRouter({ tsrConfig, apiBase }),
315316
plugins: () => [
316317
...(opts.vite?.plugins?.() || []),
317-
...(opts.routers?.ssr?.vite?.plugins?.() || []),
318+
...(opts.routers?.api?.vite?.plugins?.() || []),
318319
// serverTransform({
319320
// runtime: '@tanstack/start/server-runtime',
320321
// }),

0 commit comments

Comments
 (0)