@tasks/database (and @tasks/shared) export raw .ts files via "main" / "exports", which works fine for tsx/dev but blows up at runtime in the production image: ERR_UNKNOWN_FILE_EXTENSION: Unknown file extension ".ts" for /app/packages/database/src/client.ts tsup was leaving those workspace imports as externals in the output, so the deployed dist/index.mjs still tried to resolve them at startup. Switch each app to a tsup.config.ts that sets noExternal: [/^@tasks\\//], which inlines workspace packages into the bundle while keeping node_modules deps (postgres, drizzle-orm, hocuspocus, mcp-sdk, etc.) external. Verified locally: collab-server bundle size goes from 7 KB to 304 KB, confirming @tasks/database is now compiled in. Also fixed the collab start script to point at index.mjs (tsup ESM output) instead of .js. Made-with: Cursor
23 lines
503 B
JSON
23 lines
503 B
JSON
{
|
|
"name": "@tasks/mcp-server",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"build": "tsup",
|
|
"start": "node dist/index.js",
|
|
"type-check": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.4.0",
|
|
"@tasks/database": "workspace:*",
|
|
"@tasks/shared": "workspace:*",
|
|
"zod": "^3.24.0"
|
|
},
|
|
"devDependencies": {
|
|
"tsup": "^8.3.5",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.7.0"
|
|
}
|
|
}
|