dwjohnston / dwjohnston/blacksheepcode
Investigate: Migrate deployment from Netlify to Cloudflare
- Dominant language
- MDX
- Stars
- 3
- Forks
- 1
- Avg merge
- 6m
- Merged PRs (30d)
- 2
Description
## Motivation
Netlify has sparse documentation and has proven unreliable. The site has no stateful backend (no long-running process, no in-memory state, no WebSockets) — it's a Next.js app with static generation and edge-compatible server components, making it a good fit for Cloudflare's edge runtime.
## Investigation scope
### Pick an adapter
Two options for running Next.js on Cloudflare:
1. **`@cloudflare/next-on-pages`** — Cloudflare's official adapter. Compiles Next.js output to run on Cloudflare Pages (V8 isolate runtime, not Node.js). Straightforward but stricter — anything using Node-specific APIs at runtime will break.
2. **`opennextjs-cloudflare`** (OpenNext) — Community-driven, broader Next.js compatibility, handles more Node.js edge cases. Generally more capable for complex apps.
Assess which is the better fit and document the reasoning.
### Known potential pain points to investigate
- **Sentry** (`@sentry/nextjs`) — needs Cloudflare-specific configuration; assess whether it works out of the box or requires changes
- **Dynamic imports of compiled post files** — `getBlogContent()` in `src/utils/blogPosts.tsx` uses dynamic imports of `.mjs` files from `src/generated/mdx/`; verify these work in the edge runtime
- **`netlify.toml` / `@netlify/plugin-nextjs`** — both go away; document what replaces them
- **Build pipeline** — the `generate:all` step runs in Node.js at build time, so it should be unaffected; confirm this
### Deliverable
A proof-of-concept deploy on a branch/preview environment, plus a follow-up issue documenting what needs to change for a full migration.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.