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) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-21 18:53:55 +02:00
parent 92fe23d461
commit 177734a860
4 changed files with 14 additions and 1 deletions

View file

@ -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,

View file

@ -9,6 +9,7 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
"moduleResolution": "bundler",
"allowImportingTsExtensions": true
}
}

View file

@ -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,

View file

@ -6,6 +6,8 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": true,
"target": "ES2022",
"sourceMap": true,
"outDir": "./dist",