Skip to main content

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

ModuleStatusNotes
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

ModuleStatusNotes
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

ModuleStatusNotes
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

ModuleStatusNotes
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

FeatureStatusNotes
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

FeatureStatusNotes
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

FeatureStatusNotes
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

Metadata

FeatureStatusNotes
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

FeatureStatusNotes
connection()βœ…Forces dynamic rendering
instrumentation.tsβœ…register() and onRequestError() callbacks
Route segment config🟑revalidate, dynamic, dynamicParams. runtime and preferredRegion are ignored

Configuration

FeatureStatusNotes
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.
For features not supported, see the Known Limitations page.

Build docs developers (and LLMs) love