From 177734a860fa1065c49dd06b9292aa0ac00dd376 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 21 Apr 2026 18:53:55 +0200 Subject: [PATCH] fix(tsconfig): unblock shared-types consumers shared-types/src/index.ts re-exports with explicit .ts extensions (Tailwind v4 module resolver needs them). TS 5.7 requires consumers to opt in via allowImportingTsExtensions. The flag only type-checks when noEmit:true; the NestJS builder also needs rewriteRelativeImportExtensions so tsc still emits valid JS. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/todo/packages/shared/tsconfig.json | 4 ++++ games/arcade/apps/web/tsconfig.json | 3 ++- packages/shared-types/tsconfig.json | 6 ++++++ services/mana-landing-builder/tsconfig.json | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/todo/packages/shared/tsconfig.json b/apps/todo/packages/shared/tsconfig.json index 8c8de8cfe..4ef2d8bfd 100644 --- a/apps/todo/packages/shared/tsconfig.json +++ b/apps/todo/packages/shared/tsconfig.json @@ -3,6 +3,10 @@ "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", + // shared-types re-exports with explicit .ts paths (Tailwind v4 + // module resolver needs them). Consumers need this opt-in; + // noEmit:true means no rewrite flag is required. + "allowImportingTsExtensions": true, "strict": true, "esModuleInterop": true, "skipLibCheck": true, diff --git a/games/arcade/apps/web/tsconfig.json b/games/arcade/apps/web/tsconfig.json index a8f10c8e3..9637d322e 100644 --- a/games/arcade/apps/web/tsconfig.json +++ b/games/arcade/apps/web/tsconfig.json @@ -9,6 +9,7 @@ "skipLibCheck": true, "sourceMap": true, "strict": true, - "moduleResolution": "bundler" + "moduleResolution": "bundler", + "allowImportingTsExtensions": true } } diff --git a/packages/shared-types/tsconfig.json b/packages/shared-types/tsconfig.json index c828b6630..321216a6c 100644 --- a/packages/shared-types/tsconfig.json +++ b/packages/shared-types/tsconfig.json @@ -3,6 +3,12 @@ "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", + // src/index.ts re-exports with explicit .ts extensions (needed so + // Tailwind's module resolver can follow the package out of its + // bundler when scanning branded components). noEmit:true means + // the rewrite flag isn't needed — this is the matching compiler + // opt-in that lets tsc see the .ts imports without erroring. + "allowImportingTsExtensions": true, "lib": ["ES2022"], "strict": true, "esModuleInterop": true, diff --git a/services/mana-landing-builder/tsconfig.json b/services/mana-landing-builder/tsconfig.json index 137403b56..f0ae77488 100644 --- a/services/mana-landing-builder/tsconfig.json +++ b/services/mana-landing-builder/tsconfig.json @@ -6,6 +6,8 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, + "allowImportingTsExtensions": true, + "rewriteRelativeImportExtensions": true, "target": "ES2022", "sourceMap": true, "outDir": "./dist",