From 73984680a4404989398a375dc2a2d82cdd16e280 Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Mon, 18 May 2026 12:04:26 +0000 Subject: [PATCH 1/2] fix: copy frontend/browserslist into Docker build context Without this file present in /app/frontend during the production build, Angular falls back to the default browserslist (broader, older browser targets), which forces extra transpilation and inflates the initial bundle past the 5MB budget. Copying the committed browserslist preserves the intended modern targets and keeps the bundle within budget. Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1fee2714e..1311e042a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG VERSION ARG SAAS SHELL ["/bin/bash", "-c"] WORKDIR /app/frontend -COPY frontend/package.json frontend/yarn.lock frontend/angular.json frontend/tsconfig.app.json frontend/tsconfig.json /app/frontend/ +COPY frontend/package.json frontend/yarn.lock frontend/angular.json frontend/browserslist frontend/tsconfig.app.json frontend/tsconfig.json /app/frontend/ COPY frontend/.yarn /app/frontend/.yarn RUN apt-get update && apt-get install -y \ git \ From 25c698e4119836f55201059415b1714ce793eff9 Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Mon, 18 May 2026 12:18:29 +0000 Subject: [PATCH 2/2] fix: copy frontend/.yarnrc.yml into Docker build context Without .yarnrc.yml, the container ignores yarnPath (Yarn 3.4.1) and falls back to packageManager: yarn@1.22.22 via corepack. Yarn 1 can't parse the Yarn berry-format yarn.lock, silently ignores --immutable, and re-resolves dependencies from package.json. This pulled mermaid ^11.12.1 forward to 11.15.0 (vs locked 11.12.2), inflating the bundled scripts entry by ~560 KB and pushing the initial bundle over the 5MB budget. Copying .yarnrc.yml restores Yarn 3 and the locked resolution. Verified: Docker initial bundle drops from 5.47 MB to 4.92 MB, matching the local build. Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1311e042a..cc3036468 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG VERSION ARG SAAS SHELL ["/bin/bash", "-c"] WORKDIR /app/frontend -COPY frontend/package.json frontend/yarn.lock frontend/angular.json frontend/browserslist frontend/tsconfig.app.json frontend/tsconfig.json /app/frontend/ +COPY frontend/package.json frontend/yarn.lock frontend/.yarnrc.yml frontend/angular.json frontend/browserslist frontend/tsconfig.app.json frontend/tsconfig.json /app/frontend/ COPY frontend/.yarn /app/frontend/.yarn RUN apt-get update && apt-get install -y \ git \