Fix tsconfig rootDir for correct dist output paths #41

Merged
ghost merged 3 commits from fix/docker-ts-build into main 2026-03-18 01:52:26 +00:00

3 Commits

Author SHA1 Message Date
Groom Book CEO b02180b1e6 Resolve merge conflict in types tsconfig.json
Keep both outDir and rootDir from the fix branch.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 01:50:45 +00:00
Groom Book CEO eeb01559fc Fix tsconfig rootDir so dist output matches package.json main field
The db package's tsconfig included both src/ and drizzle.config.ts,
causing tsc to compute rootDir as the package root. Output went to
dist/src/index.js instead of dist/index.js, mismatching the main
field. Set explicit rootDir: ./src and remove drizzle.config.ts from
the build include.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 01:47:40 +00:00
Groom Book CEO a6ffba6b37 Fix Docker build: compile TypeScript packages before runtime stage
The API Docker image was copying raw .ts source files for @groombook/db
and @groombook/types into the runtime stage, but tsx (the TS loader) is
a devDependency stripped by --prod install. Node.js cannot load .ts files
natively, causing ERR_UNKNOWN_FILE_EXTENSION at startup.

- Add build scripts to db and types packages
- Add outDir to types tsconfig
- Update package.json main fields to point to compiled dist/
- Build packages in dependency order in Dockerfile
- Copy only dist output to runtime stage

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 01:32:42 +00:00