vitest.config.ts
This file
Path
apps/web/vitest.config.ts
28 lines · 854 bytes · TypeScript
Last changed by
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–3why, one step back1import { preset } from "@repo/config/vitest";2import { defineConfig, mergeConfig } from "vitest/config";3Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
line 4why, one step back4// Route modules import `cloudflare:workers`, which only workerd serves; in Node it resolves to a shim.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 5–28why, one step back5export default mergeConfig(6 preset,7 defineConfig({8 resolve: {9 // shadcn's `@/` imports, as in vite.config.ts.10 tsconfigPaths: true,11 alias: {12 "cloudflare:workers": new URL("test/workers-shim.ts", import.meta.url)13 .pathname,14 },15 },16 test: {17 // The shared tests read styles.css as text (`?raw`); vitest hands18 // every other stylesheet over empty.19 css: { include: [/\/src\/styles\.css/u] },20 include: ["test/**/*.test.tsx"],21 typecheck: {22 enabled: true,23 include: ["test/**/*.test-d.ts"],24 tsconfig: "./tsconfig.json",25 },26 },27 })28);