Commit cb14df4
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments