mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-30 17:50:07 +08:00
0adaac8dbe
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>