I tried to host Next.js on Cloudflare (and lived to regret it)
summary
A production Next.js site deploys fast with Cloudflare Pages and Wrangler, but real problems emerge: the Edge runtime runs on Cloudflare Workers, so fetch no-store ignored breaks attempts to opt out of Next.js caching; the build enforces a 5 MB bundle limit that blocks some legacy apps; environment variables require workarounds or public prefixes; on-demand revalidation only clears a single data center so fixes need a per-datacenter cache invalidation hack (query-string busting); Pages also lacks logging/observability integrations and sometimes fails builds after upstream dependency updates.
AI-written summary · about
chapters (12)
- 0:00Intro
- 1:40Buy vs Build
- 3:50The Good
- 4:52Continuous Deployment
- 6:25Edge Runtime
- 6:53Caching
- 8:26Size limitations
- 9:10Environment variables
- 10:32Story time
- 14:15Ugly parts
- 17:07What I would do
- 19:05Wrap up
related talks
35mBuilding for the Edge
11mYou've dreamed it? Create full-stack apps with Nuxt!
40mHow not to fail when choosing a modern Jamstack framework
30mWhen NOT to Use Next.js
42mTo Truly Understand Jamstack, Forget the JAM
20mPowering Up Micro Frontends At The Edge!
31mThe post-Jamstack world and the rise of Hybrid Frameworks
08mHow Your Architecture & Infrastructure Can Make or Break Your Team’s Productivity
