diff --git a/apps/collab-server/package.json b/apps/collab-server/package.json index 48eb050..6b1d68a 100644 --- a/apps/collab-server/package.json +++ b/apps/collab-server/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "dev": "tsx watch src/index.ts", - "build": "tsup src/index.ts --format esm --dts", - "start": "node dist/index.js", + "build": "tsup", + "start": "node dist/index.mjs", "type-check": "tsc --noEmit" }, "dependencies": { diff --git a/apps/collab-server/tsup.config.ts b/apps/collab-server/tsup.config.ts new file mode 100644 index 0000000..df9144e --- /dev/null +++ b/apps/collab-server/tsup.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + format: ["esm"], + dts: true, + // Bundle workspace packages into the output so the runtime image doesn't try + // to resolve `@tasks/database` (which exports raw .ts files) at import time — + // Node 20 cannot load .ts. Third-party deps stay external and are installed + // via the regular node_modules layer in the runtime image. + noExternal: [/^@tasks\//], + target: "node20", + platform: "node", + clean: true, +}); diff --git a/apps/mcp-server/package.json b/apps/mcp-server/package.json index a716c2d..023529a 100644 --- a/apps/mcp-server/package.json +++ b/apps/mcp-server/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "tsx watch src/index.ts", - "build": "tsup src/index.ts --format esm --dts", + "build": "tsup", "start": "node dist/index.js", "type-check": "tsc --noEmit" }, diff --git a/apps/mcp-server/tsup.config.ts b/apps/mcp-server/tsup.config.ts new file mode 100644 index 0000000..260960f --- /dev/null +++ b/apps/mcp-server/tsup.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + format: ["esm"], + dts: true, + // Bundle workspace packages into the output so the runtime image doesn't try + // to resolve `@tasks/database` / `@tasks/shared` (which export raw .ts files) + // at import time — Node 20 cannot load .ts. Third-party deps stay external + // and are installed via the regular node_modules layer in the runtime image. + noExternal: [/^@tasks\//], + target: "node20", + platform: "node", + clean: true, +});