Skip to content

Commit cb14df4

Browse files
koki-developclaude
andcommitted
fix(build): include vite/client types in tsconfig.test.json
`tsconfig.test.json` overrides `types` to `["vitest/browser"]` only, and its `include` globs (spec/`__tests__` files) never pull in `src/vite-env.d.ts` — the file whose `/// <reference types="vite/client" />` normally makes `*.png` (and other Vite asset) imports resolve. Since this narrower program's file set never processes that reference, `@lexical`-adjacent... actually any `.tsx` reachable from a spec file that imports a static asset (here `WelcomeHero.tsx` importing `@/assets/logo.png`, pulled in transitively) fails type-checking with `TS2307: Cannot find module`. This reliably reproduced standalone (`bunx tsc -p tsconfig.test.json`, 3/3 runs) and is what failed CI's `build` job — `bun run build` runs this tsc invocation before `vite build`. Explicitly adding `vite/client` to the `types` array fixes it without depending on `vite-env.d.ts` being in this program's include scope. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 6780dc7 commit cb14df4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"types": ["vitest/browser"]
4+
"types": ["vite/client", "vitest/browser"]
55
},
66
"include": [
77
"src/**/*.spec.ts",

0 commit comments

Comments
 (0)