Skip to content

Commit 6d0eb74

Browse files
dylanjeffersclaude
andcommitted
ci(web-preview): strip sourcemaps before Cloudflare upload
The web preview deploy was hitting Cloudflare's 25 MiB per-asset KV limit on `assets/chunks/chunk-*.js.map`. Release and production deploys already move sourcemaps out of the bundle (and upload them to S3) before the wrangler step; the preview job didn't, so the full maps were being shipped to KV and one chunk's map exceeded the limit. We don't need preview maps anywhere — just delete them from the build output right before wrangler deploys. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 203a962 commit 6d0eb74

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/web.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,16 @@ jobs:
448448
cd packages/web
449449
cp -r ./public/.well-known build 2>/dev/null || true
450450
451+
# Source maps are uploaded to S3 in release/production deploys (see the
452+
# `Move sourcemaps` step in the release/prod jobs). For preview we don't
453+
# ship them anywhere, but they still need to be removed from the bundle —
454+
# individual chunk maps can exceed the Cloudflare 25 MiB per-asset limit
455+
# and break the deploy. Strip them from both bundles before wrangler.
456+
- name: Strip sourcemaps for preview
457+
run: |
458+
cd packages/web
459+
find build build-ssr -type f -name '*.map' -delete || true
460+
451461
- name: Deploy to Cloudflare (Preview)
452462
id: deploy
453463
env:

0 commit comments

Comments
 (0)