Skip to content

Commit 1b092e6

Browse files
bloveclaude
andcommitted
docs(workspace): record why tsconfig baseUrl cannot be dropped yet
TypeScript 7 removes `baseUrl`, and since TypeScript 5.0 the `paths` map no longer needs it. Removing it from `tsconfig.base.json` nonetheless breaks every library that depends on another library: Nx's buildable-library executors write a generated tsconfig under `tmp/<projectRoot>/build/` whose `paths` re-declare dependency entries as workspace-root-relative dist outputs (`dist/libs/telemetry/browser`). Without a `baseUrl` those non-relative values raise TS5090 and TypeScript discards the whole `paths` map, so `render:build` and `cockpit-shell:build` fail to resolve `@threadplane/telemetry/browser` and `@threadplane/cockpit-registry`. Leave the option in place and record the blocker next to it so the next attempt starts from the Nx side rather than re-deriving this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 54b1bf0 commit 1b092e6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tsconfig.base.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
"noImplicitOverride": true,
1616
"noImplicitReturns": true,
1717
"noUnusedLocals": true,
18+
// TypeScript 7 drops `baseUrl`, and since TypeScript 5.0 the `paths` below
19+
// no longer need it (they resolve against this file's directory). It cannot
20+
// go yet: Nx's buildable-library executors (`@nx/angular:package`,
21+
// `@nx/js:tsc`) write a generated tsconfig under `tmp/<projectRoot>/build/`
22+
// that re-declares `paths` with workspace-root-relative dist outputs such as
23+
// `dist/libs/telemetry/browser`. Those entries are non-relative, so without a
24+
// `baseUrl` TypeScript reports TS5090 and discards the whole `paths` map,
25+
// and every library that depends on another library fails to compile.
26+
// Removing this needs an Nx fix (or the Nx TS-solution setup) first.
1827
"baseUrl": ".",
1928
"paths": {
2029
"@threadplane/design-tokens": ["libs/design-tokens/src/index.ts"],

0 commit comments

Comments
 (0)