- Override the 'types' array to only include 'node' types - Exclude 'types' directory and any nested types directories from build - Add comment explaining the types override rationale - This prevents TypeScript from looking for vitest/globals and test-env types The issue was that tsconfig.build.json was inheriting test-related type definitions from tsconfig.json which aren't available in the minimal Docker build environment. Code reviewed and enhanced based on suggestions: - Added '**/types' to exclude pattern for comprehensive exclusion - Added explanatory comment for future maintainers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
319 B
JSON
10 lines
319 B
JSON
{
|
|
"extends": "./tsconfig.json",
|
|
"compilerOptions": {
|
|
"rootDir": "./src",
|
|
// Override parent's types to exclude test-related types for production builds
|
|
"types": ["node"]
|
|
},
|
|
"include": ["src/**/*"],
|
|
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts", "tests", "types", "**/types"]
|
|
} |