Skip to content

Commit

Permalink
fix(start): extend api router schema to allow vite plugins (#2436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ponjimon authored Sep 29, 2024
1 parent bed07a1 commit b87cd8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/start/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ const routersSchema = z.object({
api: z
.object({
entry: z.string().optional(),
vite: viteSchema.optional(),
})
.optional(),
})
Expand Down Expand Up @@ -314,7 +315,7 @@ export function defineConfig(
routes: tsrFileRouter({ tsrConfig, apiBase }),
plugins: () => [
...(opts.vite?.plugins?.() || []),
...(opts.routers?.ssr?.vite?.plugins?.() || []),
...(opts.routers?.api?.vite?.plugins?.() || []),
// serverTransform({
// runtime: '@tanstack/start/server-runtime',
// }),
Expand Down

0 comments on commit b87cd8a

Please sign in to comment.