Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudflare/vinext/llms.txt
Use this file to discover all available pages before exploring further.
Overview
vinext implements approximately 94% of the Next.js 16 API surface with full or partial support. The remaining gaps are intentional stubs for deprecated features and edge cases.
Legend:
- β
= Full implementation
- π‘ = Partial (runtime behavior correct, some build-time optimizations missing)
- β¬ = Intentional stub/no-op
Module Shims
Every next/* import is shimmed to a Vite-compatible implementation.
Core Modules
| Module | Status | Notes |
|---|
next/link | β
| All props including prefetch (IntersectionObserver), onNavigate, scroll restoration, basePath, locale |
next/image | π‘ | Remote images via @unpic/react (28 CDNs). Local images via <img> + srcSet. No build-time optimization/resizing |
next/head | β
| SSR collection + client-side DOM manipulation |
next/router | β
| useRouter, Router singleton, events, client-side navigation, SSR context, i18n |
next/navigation | β
| usePathname, useSearchParams, useParams, useRouter, redirect, notFound, forbidden, unauthorized |
next/server | β
| NextRequest, NextResponse, NextURL, cookies, userAgent, after, connection, URLPattern |
next/headers | β
| Async headers(), cookies(), draftMode() |
next/dynamic | β
| ssr: true, ssr: false, loading component |
next/script | β
| All 4 strategies (beforeInteractive, afterInteractive, lazyOnload, worker) |
Fonts and Assets
| Module | Status | Notes |
|---|
next/font/google | π‘ | Runtime CDN loading. No self-hosting, font subsetting, or fallback metrics |
next/font/local | π‘ | Runtime @font-face injection. Not extracted at build time |
next/og | β
| OG image generation via @vercel/og (Satori + resvg) |
Cache and State
| Module | Status | Notes |
|---|
next/cache | β
| revalidateTag, revalidatePath, unstable_cache, pluggable CacheHandler, "use cache" with cacheLife() and cacheTag() |
next/form | β
| GET form interception + POST server action delegation |
Legacy and Utility
| Module | Status | Notes |
|---|
next/legacy/image | β
| Translates legacy props to modern Image |
next/error | β
| Default error page component |
next/config | β
| getConfig / setConfig |
next/document | β
| Html, Head, Main, NextScript |
next/constants | β
| All phase constants |
next/amp | β¬ | No-op (AMP is deprecated) |
next/web-vitals | β¬ | No-op (use the web-vitals library directly) |
Routing Features
| Feature | Status | Notes |
|---|
File-system routing (pages/) | β
| Automatic scanning with hot-reload on file changes |
File-system routing (app/) | β
| Pages, routes, layouts, templates, loading, error, not-found, forbidden, unauthorized |
Dynamic routes [param] | β
| Both routers |
Catch-all [...slug] | β
| Both routers |
Optional catch-all [[...slug]] | β
| Both routers |
Route groups (group) | β
| URL-transparent, layouts still apply |
Parallel routes @slot | β
| Discovery, layout props, default.tsx, inherited slots |
| Intercepting routes | β
| (.), (..), (..)(..), (...) conventions |
Route handlers (route.ts) | β
| Named HTTP methods, auto OPTIONS/HEAD, cookie attachment |
| Middleware | β
| middleware.ts and proxy.ts (Next.js 16). Matcher patterns (string, array, regex, :param, :path*, :path+) |
| i18n routing | π‘ | Pages Router locale prefix, Accept-Language detection, NEXT_LOCALE cookie. No domain-based routing |
basePath | β
| Applied everywhere β URLs, Link, Router, navigation hooks |
trailingSlash | β
| 308 redirects to canonical form |
Server Features
Rendering
| Feature | Status | Notes |
|---|
| SSR (Pages Router) | β
| Streaming, _app/_document, __NEXT_DATA__, hydration |
| SSR (App Router) | β
| RSC pipeline, nested layouts, streaming, nav context for client components |
| React Server Components | β
| Via @vitejs/plugin-rsc. "use client" boundaries work correctly |
| Streaming SSR | β
| Both routers |
Static export (output: 'export') | β
| Generates static HTML/JSON for all routes |
Data Fetching
| Feature | Status | Notes |
|---|
getStaticProps | β
| Props, redirect, notFound, revalidate |
getStaticPaths | β
| fallback: false, true, "blocking" |
getServerSideProps | β
| Full context including locale |
| ISR | β
| Stale-while-revalidate, pluggable CacheHandler, background regeneration |
Server Actions ("use server") | β
| Action execution, FormData, re-render after mutation, redirect() in actions |
"use cache" directive | β
| File-level and function-level. cacheLife() profiles, cacheTag(), stale-while-revalidate |
| Feature | Status | Notes |
|---|
| Metadata API | β
| metadata, generateMetadata, viewport, generateViewport, title templates |
| Metadata file routes | β
| sitemap.xml, robots.txt, manifest, favicon, OG images (static + dynamic) |
generateStaticParams | β
| With dynamicParams enforcement |
Other Server Features
| Feature | Status | Notes |
|---|
connection() | β
| Forces dynamic rendering |
instrumentation.ts | β
| register() and onRequestError() callbacks |
| Route segment config | π‘ | revalidate, dynamic, dynamicParams. runtime and preferredRegion are ignored |
Configuration
| Feature | Status | Notes |
|---|
next.config.js / .ts / .mjs | β
| Function configs, phase argument |
rewrites / redirects / headers | β
| All phases, param interpolation |
Environment variables (NEXT_PUBLIC_*) | β
| Inlined at build time via Vite |
images config | π‘ | Parsed but not used for optimization |
Caching
The cache is pluggable. The default MemoryCacheHandler works out of the box. For production, use a custom backend:
import { setCacheHandler } from "next/cache";
import { KVCacheHandler } from "vinext/cloudflare";
setCacheHandler(new KVCacheHandler(env.MY_KV_NAMESPACE));
The CacheHandler interface matches Next.js 16βs shape, so community adapters should be compatible.
Test Coverage
vinextβs API compatibility is verified by:
- 1,700+ Vitest tests β Unit and integration tests
- 380+ Playwright E2E tests β Browser-based testing
- Tests ported from Next.js β Direct compatibility verification
- OpenNext conformance suite β Cloudflare deployment behavior
See the test tracking document for detailed results.