From bd208e71f8e8de35b4ccf5bc669cad92a5bdb633 Mon Sep 17 00:00:00 2001 From: czlonkowski <56956555+czlonkowski@users.noreply.github.com> Date: Wed, 30 Jul 2025 10:18:29 +0200 Subject: [PATCH] fix: override test-related types in tsconfig.build.json for Docker builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- tsconfig.build.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index b36d91b..7b70972 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,8 +1,10 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "rootDir": "./src" + "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"] + "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts", "tests", "types", "**/types"] } \ No newline at end of file