mirror of
https://github.com/hanzoai/zod.git
synced 2026-09-24 17:04:49 +00:00
33 lines
854 B
TypeScript
33 lines
854 B
TypeScript
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { type ViteUserConfig, defineConfig } from "vitest/config";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
conditions: ["@zod/source", "default"],
|
|
externalConditions: ["@zod/source", "default"],
|
|
},
|
|
ssr: {
|
|
resolve: {
|
|
conditions: ["@zod/source", "default"],
|
|
externalConditions: ["@zod/source", "default"],
|
|
},
|
|
},
|
|
test: {
|
|
projects: ["packages/*"],
|
|
watch: false,
|
|
isolate: true,
|
|
setupFiles: [resolve(__dirname, "scripts/fail-on-console.ts")],
|
|
typecheck: {
|
|
include: ["**/*.test.ts"],
|
|
enabled: true,
|
|
ignoreSourceErrors: false,
|
|
checker: "tsc",
|
|
tsconfig: "./tsconfig.json",
|
|
},
|
|
silent: true,
|
|
},
|
|
}) as ViteUserConfig;
|