Files
zpan/.github
saltbo 0adaac8dbe fix(cf-deploy): run wrangler from repo root, not dist/zpan
wrangler 4.x errors when it finds both a local wrangler.json and a
parent .wrangler/deploy/config.json redirect file — "base paths do not
match" — which is exactly what happens if you cd into dist/zpan after
the @cloudflare/vite-plugin build.

The old `cd dist/zpan` workaround predates the vite-plugin generating
.wrangler/deploy/config.json on build. Now that the redirect file
exists, running wrangler from the repo root is the correct path:
wrangler picks up the redirect, uses dist/zpan/wrangler.json, and
resolves ../client / index.js / etc. relative to *that* config's
location — all paths correct.

Empirically: `wrangler deploy --dry-run` from root reports
"Read 333 files from the assets directory .../dist/client" and all
three bindings (D1 + R2 + ASSETS) are recognized. No 404.

Fixes the cloudflare deploy job in bonaysoft/zpan's first run of the
new dispatcher.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:31:06 -04:00
..
2020-09-08 00:17:54 +08:00