Next.js
Deploy Next.js apps to Creek — static export or full SSR.
Quick Start
npx create-next-app my-app
cd my-app
npm install @solcreek/adapter-creek
npx creek deployCreek auto-detects Next.js >= 16.2.3, invokes the adapter, and deploys. No configuration needed.
Static Export
For pure static sites, add output: "export" to your Next.js config:
const nextConfig = {
output: "export",
};
export default nextConfig;Creek deploys the out/ directory as a static site. Do not set framework = "nextjs" in creek.toml for static export — Creek treats it as a standard static site, which is correct.
SSR (Server-Side Rendering)
Install the adapter and deploy:
npm install @solcreek/adapter-creek
npx creek deployThat's it. The CLI detects Next.js >= 16.2.3 + the adapter package, then:
- Runs
next build --webpackwith the adapter'sNEXT_ADAPTER_PATH - The adapter's
onBuildCompletehook bundles the worker output - CLI uploads
.creek/adapter-output/(worker + static assets)
creek.toml (optional)
[project]
name = "my-nextjs-app"
framework = "nextjs"Setting framework = "nextjs" is optional — the CLI auto-detects from package.json. Useful when you want to pin the project name.
What the adapter handles
- Streaming SSR via
TransformStream— nonode:httpserver dependency - Embedded manifests — route, build, and prerender manifests inlined into the bundle via a custom
fsshim - Node.js API shims —
http,https,net,inspector,fs,vm,processEventEmitter stubs - Turbopack runtime patching — dynamic chunk loading replaced with static
requireChunk()switch
Monorepo Setup
In a pnpm/npm/yarn monorepo, Next.js 16+ requires turbopack.root:
import { resolve } from "node:path";
const nextConfig = {
turbopack: {
root: resolve(process.cwd(), "../.."),
},
};
export default nextConfig;Known Limitations
- Requires Next.js >= 16.2.3 — older versions fall back to a legacy build path
--webpackflag is mandatory — Turbopack's chunked output format can't be bundled by esbuild (the adapter sets this automatically)- ISR / on-demand revalidation — cache handler is in-memory only; Durable Object-backed cache is planned
- Image Optimization — use
unoptimized: trueor a custom loader;sharpis shimmed to no-op (falls back toresvg.wasmfor@vercel/og) - Bundle size — large Next.js apps produce 5-7MB workers; within Workers limits but worth monitoring
Links
@solcreek/adapter-creek— adapter source + changelog- creek.dev — deployed via this adapter as dogfood