From f45ed3a62a3384ded4d8f4c24897e2db9450c3bc Mon Sep 17 00:00:00 2001 From: Wayne <5291640+ringoinca@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:00:05 +0300 Subject: [PATCH] Build package separately --- docker/Dockerfile | 8 +++++--- package.json | 2 +- tsconfig.build.json | 4 ---- 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 tsconfig.build.json diff --git a/docker/Dockerfile b/docker/Dockerfile index 5a1dbd1..bf6fae3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,14 +13,16 @@ COPY packages/backend/package.json ./packages/backend/ COPY packages/frontend/package.json ./packages/frontend/ COPY packages/types/package.json ./packages/types/ -# Install all dependencies +# Install all dependencies to create workspace links RUN pnpm install --frozen-lockfile --prod=false # Copy the rest of the source code COPY . . -# Build all packages. -RUN pnpm build +# Build packages in order. +RUN pnpm --filter @open-archiver/types build +RUN pnpm --filter @open-archiver/backend build +RUN pnpm --filter @open-archiver/frontend build # 2. Production Stage: Install only production dependencies and copy built artifacts FROM node:22-alpine AS production diff --git a/package.json b/package.json index e74d52a..6201fca 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "scripts": { "dev": "dotenv -- pnpm --filter \"./packages/*\" --parallel dev", - "build": "tsc -b tsconfig.build.json && pnpm --filter @open-archiver/frontend build", + "build": "pnpm --filter \"./packages/*\" --parallel build", "start": "dotenv -- pnpm --filter \"./packages/*\" --parallel start", "start:workers": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker\" \"pnpm --filter @open-archiver/backend start:indexing-worker\" \"pnpm --filter @open-archiver/backend start:sync-scheduler\"", "start:workers:dev": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker:dev\" \"pnpm --filter @open-archiver/backend start:indexing-worker:dev\" \"pnpm --filter @open-archiver/backend start:sync-scheduler:dev\"", diff --git a/tsconfig.build.json b/tsconfig.build.json deleted file mode 100644 index 3322749..0000000 --- a/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "files": [], - "references": [{ "path": "packages/types" }, { "path": "packages/backend" }] -}