From 26aeaa7c2d77d8bc8a44bdfd70fb54aab87895dc Mon Sep 17 00:00:00 2001 From: Wayne <5291640+ringoinca@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:44:00 +0300 Subject: [PATCH] PNPM workspace build order --- docker/Dockerfile | 7 ++++--- packages/backend/tsconfig.json | 4 +--- packages/types/tsconfig.json | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3ccf7d7..eda123e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,9 +19,10 @@ RUN pnpm install --shamefully-hoist --frozen-lockfile --prod=false # Copy the rest of the source code COPY . . -# Build the backend and all its dependencies, then build the frontend -RUN pnpm --filter @open-archiver/backend... --stream build -RUN pnpm --filter @open-archiver/frontend --stream 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/packages/backend/tsconfig.json b/packages/backend/tsconfig.json index d303a78..06ef33b 100644 --- a/packages/backend/tsconfig.json +++ b/packages/backend/tsconfig.json @@ -3,11 +3,9 @@ "compilerOptions": { "outDir": "./dist", "rootDir": "./src", - "composite": true, "emitDecoratorMetadata": true, "experimentalDecorators": true }, "include": ["src/**/*.ts"], - "exclude": ["node_modules", "dist"], - "references": [{ "path": "../types" }] + "exclude": ["node_modules", "dist"] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 03428d6..492b402 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "./dist", "rootDir": "./src", - "composite": true, "declaration": true }, "include": ["src/**/*.ts"],