Next.js frontend onto Cloudflare Workers via @opennextjs/cloudflare
Four commits to get the Next.js frontend shipping to Cloudflare Workers: a `next` version bump to satisfy the peer range, a minimal `wrangler.jsonc`, explicit `cf:build`/`cf:deploy`/`cf:preview` npm scripts, and deletion of `frontend/bun.lock` to stop Cloudflare's auto-detection from picking Bun.
The next bump from 16.0.3 to 16.0.11 is a peer-range fix. @opennextjs/cloudflare requires ~16.0.11 || ^16.1.5; the original pin broke install on the Cloudflare deploy. This is a safe pull regardless of whether you take any other part of this thread.
The wrangler.jsonc is the canonical output of the @opennextjs/cloudflare CLI: worker name "gary," nodejs_compat and global_fetch_strictly_public compatibility flags, an ASSETS binding pointing at .open-next/assets, the WORKER_SELF_REFERENCE service binding (self-referential, required for the OpenNext caching layer), and an IMAGES binding for image optimization. Standard boilerplate; nothing fork-specific beyond the name.
foolish-bandit split cf:build and cf:deploy into separate scripts in frontend/package.json rather than relying on the combined deploy script, and added README documentation explicitly calling out that this is the Workers path, not Pages. The bun.lock removal is the same story as the backend: Cloudflare's framework detector sees a Bun lockfile and provisions Bun, even though this project uses npm. Deleting it fixes the detection.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?