diff --git a/packages/api/package.json b/packages/api/package.json index da78b80ec5..54d8bacfa6 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -87,7 +87,7 @@ "dev": "DOTENV_CONFIG_PATH=.env.development nodemon --exec 'ts-node' --transpile-only -r tsconfig-paths/register -r dotenv-expand/config -r '@hyperdx/node-opentelemetry/build/src/tracing' ./src/index.ts", "dev:mcp": "npx @modelcontextprotocol/inspector", "dev-task": "DOTENV_CONFIG_PATH=.env.development nodemon --exec 'ts-node' --transpile-only -r tsconfig-paths/register -r dotenv-expand/config -r '@hyperdx/node-opentelemetry/build/src/tracing' ./src/tasks/index.ts", - "build": "rimraf ./build && tsc && tsc-alias && cp -r ./src/opamp/proto ./build/opamp/", + "build": "rimraf ./build && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && cp -r ./src/opamp/proto ./build/opamp/", "build:vercel": "rimraf ./build && tsc -p tsconfig.vercel.json && tsc-alias -p tsconfig.vercel.json && cp -r ./src/opamp/proto ./build/opamp/", "lint": "npx eslint --quiet . --ext .ts", "lint:fix": "npx eslint . --ext .ts --fix", diff --git a/packages/api/tsconfig.build.json b/packages/api/tsconfig.build.json index af9b44c61f..a6e0966cf1 100644 --- a/packages/api/tsconfig.build.json +++ b/packages/api/tsconfig.build.json @@ -1,12 +1,8 @@ { "extends": "./tsconfig.json", - "include": [ - "src", - "migrations", - "scripts" - ], - "exclude": [ - "node_modules", - "**/*.test.ts" - ] -} \ No newline at end of file + "compilerOptions": { + "rootDir": "./src" + }, + "include": ["src"], + "exclude": ["node_modules", "**/*.test.ts"] +} diff --git a/packages/api/tsconfig.json b/packages/api/tsconfig.json index da045488fe..09b1834aff 100644 --- a/packages/api/tsconfig.json +++ b/packages/api/tsconfig.json @@ -16,8 +16,7 @@ "compilerOptions": { // ts-node compiles single files on demand (e.g. `src/index.ts` for the // dev server), so TypeScript infers the common source dir as `./src`. - // TS 6 requires that inferred rootDir to be explicit (TS5011). The full - // `tsc` build keeps its implicit root (which spans src/migrations/scripts). + // TS 6 requires that inferred rootDir to be explicit (TS5011). "rootDir": "./src" } },