From 070df27e4d18cdc9265c9a9692089fe90b6019da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20Tolm=C3=A1cs?= Date: Wed, 24 Jun 2026 12:52:56 +0200 Subject: [PATCH] fix(editor): Modern TS require imports from rootDir (#11552) --------- Signed-off-by: Mark Tolmacs Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com> --- packages/common/tsconfig.json | 3 ++- packages/element/tsconfig.json | 1 + packages/excalidraw/tsconfig.json | 1 + packages/fractional-indexing/tsconfig.json | 3 ++- packages/laser-pointer/package.json | 4 ++-- packages/laser-pointer/tsconfig.json | 3 ++- packages/math/tsconfig.json | 1 + packages/tsconfig.base.json | 2 +- packages/utils/tsconfig.json | 1 + tsconfig.json | 2 +- 10 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json index 6450145b1c..93c85b385e 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { - "outDir": "./dist/types" + "outDir": "./dist/types", + "rootDir": "../" }, "include": ["src/**/*", "global.d.ts"], "exclude": ["**/*.test.*", "tests", "types", "examples", "dist"] diff --git a/packages/element/tsconfig.json b/packages/element/tsconfig.json index 6450145b1c..3a296c853f 100644 --- a/packages/element/tsconfig.json +++ b/packages/element/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { + "rootDir": "../", "outDir": "./dist/types" }, "include": ["src/**/*", "global.d.ts"], diff --git a/packages/excalidraw/tsconfig.json b/packages/excalidraw/tsconfig.json index 793fd5abdd..ddbcd42c42 100644 --- a/packages/excalidraw/tsconfig.json +++ b/packages/excalidraw/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { + "rootDir": "../", "outDir": "./dist/types" }, "include": ["**/*"], diff --git a/packages/fractional-indexing/tsconfig.json b/packages/fractional-indexing/tsconfig.json index 6450145b1c..93c85b385e 100644 --- a/packages/fractional-indexing/tsconfig.json +++ b/packages/fractional-indexing/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { - "outDir": "./dist/types" + "outDir": "./dist/types", + "rootDir": "../" }, "include": ["src/**/*", "global.d.ts"], "exclude": ["**/*.test.*", "tests", "types", "examples", "dist"] diff --git a/packages/laser-pointer/package.json b/packages/laser-pointer/package.json index dca2e094c7..a9c76e5337 100644 --- a/packages/laser-pointer/package.json +++ b/packages/laser-pointer/package.json @@ -3,12 +3,12 @@ "version": "1.3.1", "description": "Generate outline for laser pointer tool", "type": "module", - "types": "./dist/types/index.d.ts", + "types": "./dist/types/laser-pointer/src/index.d.ts", "main": "./dist/prod/index.js", "module": "./dist/prod/index.js", "exports": { ".": { - "types": "./dist/types/index.d.ts", + "types": "./dist/types/laser-pointer/src/index.d.ts", "development": "./dist/dev/index.js", "production": "./dist/prod/index.js", "default": "./dist/prod/index.js" diff --git a/packages/laser-pointer/tsconfig.json b/packages/laser-pointer/tsconfig.json index 6450145b1c..93c85b385e 100644 --- a/packages/laser-pointer/tsconfig.json +++ b/packages/laser-pointer/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { - "outDir": "./dist/types" + "outDir": "./dist/types", + "rootDir": "../" }, "include": ["src/**/*", "global.d.ts"], "exclude": ["**/*.test.*", "tests", "types", "examples", "dist"] diff --git a/packages/math/tsconfig.json b/packages/math/tsconfig.json index 6450145b1c..3a296c853f 100644 --- a/packages/math/tsconfig.json +++ b/packages/math/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { + "rootDir": "../", "outDir": "./dist/types" }, "include": ["src/**/*", "global.d.ts"], diff --git a/packages/tsconfig.base.json b/packages/tsconfig.base.json index 0475a9bcea..59c10c0f14 100644 --- a/packages/tsconfig.base.json +++ b/packages/tsconfig.base.json @@ -6,7 +6,7 @@ "declaration": true, "allowSyntheticDefaultImports": true, "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "bundler", "resolveJsonModule": true, "jsx": "react-jsx", "emitDeclarationOnly": true, diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 6450145b1c..3a296c853f 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { + "rootDir": "../", "outDir": "./dist/types" }, "include": ["src/**/*", "global.d.ts"], diff --git a/tsconfig.json b/tsconfig.json index da95861337..da8329db6a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "ESNext", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true,