Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,17 @@ export default defineConfig({
},
deps: {
optimizer: {
ssr: { enabled: true },
ssr: {
enabled: true,
// zod's entry does `import * as z from './v4/classic/external.js'`
// then `export * from` the same module plus `export { z }`. Vite's
// SSR transform drops the `z` binding in that combination, so
// `import { z } from 'zod'` lands as undefined and every schema in
// the codebase throws on load. Pre-bundling zod with esbuild
// sidesteps the SSR transform and re-exports it correctly.
// Externalizing it instead does NOT help — verified.
include: ['zod'],
},
},
},
},
Expand Down
Loading