Skip to content

Commit e405bb5

Browse files
guguclaude
andauthored
fix: copy frontend/browserslist into Docker build context (#1781)
* 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) <noreply@anthropic.com> * 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) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7b279d7 commit e405bb5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG VERSION
33
ARG SAAS
44
SHELL ["/bin/bash", "-c"]
55
WORKDIR /app/frontend
6-
COPY frontend/package.json frontend/yarn.lock frontend/angular.json frontend/tsconfig.app.json frontend/tsconfig.json /app/frontend/
6+
COPY frontend/package.json frontend/yarn.lock frontend/.yarnrc.yml frontend/angular.json frontend/browserslist frontend/tsconfig.app.json frontend/tsconfig.json /app/frontend/
77
COPY frontend/.yarn /app/frontend/.yarn
88
RUN apt-get update && apt-get install -y \
99
git \

0 commit comments

Comments
 (0)