diff --git a/packages/grafana-alerting/tsconfig.build.json b/packages/grafana-alerting/tsconfig.build.json index b33ea40d937..be069014a31 100644 --- a/packages/grafana-alerting/tsconfig.build.json +++ b/packages/grafana-alerting/tsconfig.build.json @@ -1,4 +1,7 @@ { "exclude": ["dist", "node_modules", "tests", "**/*.test.ts*", "**/*.story.tsx"], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-api-clients/tsconfig.build.json b/packages/grafana-api-clients/tsconfig.build.json index 82391831633..0a1aef2cd49 100644 --- a/packages/grafana-api-clients/tsconfig.build.json +++ b/packages/grafana-api-clients/tsconfig.build.json @@ -1,4 +1,7 @@ { "extends": "./tsconfig.json", - "exclude": ["dist", "node_modules", "**/*.test.ts*"] + "exclude": ["dist", "node_modules", "**/*.test.ts*"], + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-data/tsconfig.build.json b/packages/grafana-data/tsconfig.build.json index 54309163ebc..83940711f95 100644 --- a/packages/grafana-data/tsconfig.build.json +++ b/packages/grafana-data/tsconfig.build.json @@ -1,4 +1,7 @@ { "exclude": ["dist", "node_modules", "test", "**/*.test.ts*"], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-e2e-selectors/tsconfig.build.json b/packages/grafana-e2e-selectors/tsconfig.build.json index 9ec189c28ea..a0e9333bcc1 100644 --- a/packages/grafana-e2e-selectors/tsconfig.build.json +++ b/packages/grafana-e2e-selectors/tsconfig.build.json @@ -1,4 +1,7 @@ { "exclude": ["dist", "node_modules", "**/*.test.ts*"], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-flamegraph/tsconfig.build.json b/packages/grafana-flamegraph/tsconfig.build.json index df3b220ccc4..33e4266b17f 100644 --- a/packages/grafana-flamegraph/tsconfig.build.json +++ b/packages/grafana-flamegraph/tsconfig.build.json @@ -2,7 +2,8 @@ "compilerOptions": { "paths": { "@emotion/core": ["./src/types/emotion-core-stub.d.ts"] - } + }, + "rootDir": "./src" }, "exclude": ["**/*.test.ts*"], "extends": "./tsconfig.json" diff --git a/packages/grafana-i18n/tsconfig.build.json b/packages/grafana-i18n/tsconfig.build.json index 54309163ebc..83940711f95 100644 --- a/packages/grafana-i18n/tsconfig.build.json +++ b/packages/grafana-i18n/tsconfig.build.json @@ -1,4 +1,7 @@ { "exclude": ["dist", "node_modules", "test", "**/*.test.ts*"], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-o11y-ds-frontend/tsconfig.json b/packages/grafana-o11y-ds-frontend/tsconfig.json index c77d4f035c9..b737389c12a 100644 --- a/packages/grafana-o11y-ds-frontend/tsconfig.json +++ b/packages/grafana-o11y-ds-frontend/tsconfig.json @@ -8,7 +8,8 @@ "emitDeclarationOnly": true, "isolatedModules": true, "allowJs": true, - "rootDirs": ["."] + "rootDirs": ["."], + "rootDir": "../.." }, "exclude": ["dist/**/*"], "include": [ diff --git a/packages/grafana-prometheus/tsconfig.build.json b/packages/grafana-prometheus/tsconfig.build.json index e26e8b407af..51c9379bece 100644 --- a/packages/grafana-prometheus/tsconfig.build.json +++ b/packages/grafana-prometheus/tsconfig.build.json @@ -8,5 +8,8 @@ "src/querybuilder/testUtils.ts", "../../public/test/setupTests.ts" ], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-runtime/tsconfig.build.json b/packages/grafana-runtime/tsconfig.build.json index 12aedca702c..a3377e449ca 100644 --- a/packages/grafana-runtime/tsconfig.build.json +++ b/packages/grafana-runtime/tsconfig.build.json @@ -1,4 +1,7 @@ { "exclude": ["dist", "node_modules", "**/*.test.ts*", "../../public/test/setupTests.ts"], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-schema/tsconfig.build.json b/packages/grafana-schema/tsconfig.build.json index ec58518c0b3..8300ef11e49 100644 --- a/packages/grafana-schema/tsconfig.build.json +++ b/packages/grafana-schema/tsconfig.build.json @@ -1,4 +1,7 @@ { "exclude": ["dist/**/*", "**/*.test.ts*"], - "extends": "./tsconfig.json" + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + } } diff --git a/packages/grafana-sql/tsconfig.json b/packages/grafana-sql/tsconfig.json index 4bd2161f0e0..d161796b29b 100644 --- a/packages/grafana-sql/tsconfig.json +++ b/packages/grafana-sql/tsconfig.json @@ -8,7 +8,8 @@ "emitDeclarationOnly": true, "isolatedModules": true, "strict": true, - "rootDirs": ["."] + "rootDirs": ["."], + "rootDir": "./src" }, "exclude": ["dist/**/*"], "include": ["src/**/*.ts*", "../../public/app/types/*.d.ts", "../grafana-ui/src/types/*.d.ts"] diff --git a/packages/grafana-test-utils/tsconfig.json b/packages/grafana-test-utils/tsconfig.json index aac6e9e8f15..eb5b7fc8763 100644 --- a/packages/grafana-test-utils/tsconfig.json +++ b/packages/grafana-test-utils/tsconfig.json @@ -7,7 +7,8 @@ "emitDeclarationOnly": true, "isolatedModules": true, "rootDirs": ["."], - "moduleResolution": "bundler" + "moduleResolution": "bundler", + "rootDir": "./src" }, "ts-node": { "compilerOptions": { diff --git a/packages/grafana-ui/tsconfig.build.json b/packages/grafana-ui/tsconfig.build.json index c652850c045..a38136f4005 100644 --- a/packages/grafana-ui/tsconfig.build.json +++ b/packages/grafana-ui/tsconfig.build.json @@ -3,7 +3,8 @@ "paths": { "@emotion/core": ["./src/types/emotion-core-stub.d.ts"], "@grafana/ui": ["."] - } + }, + "rootDir": "./src" }, "exclude": [ "**/*.story.tsx", diff --git a/tsconfig.json b/tsconfig.json index 963aa84555c..c3cc57216b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,6 @@ "extends": "./scripts/tsconfig.base.json", "compilerOptions": { "jsx": "react-jsx", - "baseUrl": "public/", "outDir": "public/dist", "rootDirs": ["public/"], "allowJs": true, @@ -14,7 +13,8 @@ "moduleResolution": "bundler", "tsBuildInfoFile": "./tsconfig.tsbuildinfo", "paths": { - "@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"] + "@grafana/schema/dist/esm/*": ["./packages/grafana-schema/src/*"], + "*": ["./public/*"] } }, "ts-node": {