The base tsconfig.json had types: ["vitest/globals", "@testing-library/jest-dom/vitest"] which are devDependencies only installed during development. CI production builds with npm ci --production don't include these, causing TS2688 errors. Solution: Remove types array from tsconfig.json (let TS auto-discover available types) Simplify tsconfig.build.json to only exclude test files Add triple-slash type references to test setup file Add typecheck config to vitest.config.ts This ensures: Production builds work without devDependencies Test files still have proper type definitions No JSX.IntrinsicElements errors from missing React types
14 lines
242 B
JSON
14 lines
242 B
JSON
{
|
|
"extends": "./tsconfig.json",
|
|
"include": ["src"],
|
|
"exclude": [
|
|
"src/**/*.test.ts",
|
|
"src/**/*.test.tsx",
|
|
"src/**/*.spec.ts",
|
|
"src/**/*.spec.tsx",
|
|
"src/**/__tests__/**",
|
|
"src/test",
|
|
"src/test-utils/**"
|
|
]
|
|
}
|