From 78daa490a9581fb969049225db6df02bfa7fe78a Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Wed, 27 May 2026 20:34:58 +0100 Subject: [PATCH] chore: set explicit rootDir in tsconfigs TypeScript 6 reports TS5011 ("The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set...") when @rollup/plugin-typescript invokes the compiler with an inferred rootDir. Set rootDir explicitly to the value TS was already inferring ("./src" for the main project, "../src" for the React project) so the message goes away. Verified on TS 5.9.3 that the emitted `types/` and `react/types/` file listings are byte-identical before and after, so no consumer-visible declaration shape changes. Co-Authored-By: Claude Opus 4.7 (1M context) --- react/tsconfig.json | 1 + tsconfig.json | 1 + 2 files changed, 2 insertions(+) diff --git a/react/tsconfig.json b/react/tsconfig.json index c7a368a7..8b261ef9 100644 --- a/react/tsconfig.json +++ b/react/tsconfig.json @@ -15,6 +15,7 @@ "esModuleInterop": true, "sourceMap": true, "moduleResolution": "bundler", + "rootDir": "../src", "skipLibCheck": true, "resolveJsonModule": true, "forceConsistentCasingInFileNames": true, diff --git a/tsconfig.json b/tsconfig.json index ebfc532a..b8eacf87 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,7 @@ "esModuleInterop": true, "sourceMap": true, "moduleResolution": "bundler", + "rootDir": "./src", "skipLibCheck": true, "resolveJsonModule": true, "forceConsistentCasingInFileNames": true,