fix(index-builder): bundle Pages Functions into _worker.js at build time
Every index-builder deploy was overwriting the production Pages deployment without functions (wrangler ran from /tmp, no functions/ dir visible). Compiling functions/ to dist/_worker.js during the Docker web-builder stage means the worker is always included in every Pages deploy, regardless of CWD. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
341591a10b
commit
037a04e8b5
1 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,9 @@ COPY web/package.json web/package-lock.json ./
|
|||
RUN npm ci
|
||||
COPY web/ .
|
||||
RUN npm run build
|
||||
# Bundle Pages Functions (functions/ dir) into dist/_worker.js so the
|
||||
# wrangler deploy from the index-builder runtime includes the R2 proxy function.
|
||||
RUN npx wrangler pages functions build --outfile dist/_worker.js
|
||||
|
||||
# Go binary build stage
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue