From c6e6eb626eaccadac49301a69c27038aced45ff8 Mon Sep 17 00:00:00 2001 From: austindebest Date: Mon, 20 Apr 2026 00:58:51 +0100 Subject: [PATCH] Fix TypeScript monorepo configuration - Add isolatedModules to API tsconfig - Enable composite mode for packages - Exclude packages directory from API compilation --- apps/api/tsconfig.json | 3 ++- packages/database/tsconfig.json | 8 +++++--- packages/shared-types/tsconfig.json | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index d7080cf..23207a3 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -18,11 +18,12 @@ "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, + "isolatedModules": true, "paths": { "@sdi/database": ["../../packages/database/src"], "@sdi/shared-types": ["../../packages/shared-types/src"] } }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "test"] + "exclude": ["node_modules", "dist", "test", "../../packages"] } diff --git a/packages/database/tsconfig.json b/packages/database/tsconfig.json index 5972475..5813ad6 100644 --- a/packages/database/tsconfig.json +++ b/packages/database/tsconfig.json @@ -1,9 +1,11 @@ { + "extends": "../../tsconfig.json", "compilerOptions": { - "extends": "../../tsconfig.json", "outDir": "./dist", - "rootDir": "./src" + "rootDir": "./src", + "composite": true, + "declaration": true }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist", "prisma"] } diff --git a/packages/shared-types/tsconfig.json b/packages/shared-types/tsconfig.json index 5972475..cf139ba 100644 --- a/packages/shared-types/tsconfig.json +++ b/packages/shared-types/tsconfig.json @@ -1,8 +1,10 @@ { + "extends": "../../tsconfig.json", "compilerOptions": { - "extends": "../../tsconfig.json", "outDir": "./dist", - "rootDir": "./src" + "rootDir": "./src", + "composite": true, + "declaration": true }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"]