Releases: cloudflare/vinext
vinext@0.1.0
Today's release contains several app router bundling improvements like code splitting and lazy loading for faster cold starts, and minification by default for smaller bundles. Several CLI crashes were fixed for large projects, and more Next.js parity gaps were addressed.
Vinext now supports additional configuration for caching -- the Vite plugin supports a cache object, where adapters for a data cache and a cdn cache can be supplied. The cdn adapter is intended to be used for route-level caching, while the data adapter is used for everything else, and is used for route caching in the absence of a cdn adapter. This is intended to replace manual setup in the Worker.
import vinext from "vinext";
import { kvDataAdapter } from "@vinext/cloudflare/cache/kv-data-adapter";
vinext({
cache: { data: kvDataAdapter() },
});Features
Cache
- extract Cloudflare cache adapters into @vinext/cloudflare (#1748)
- configure cache adapters from vite plugin config (#1733)
- split CDN and data cache adapters; add Cloudflare edge adapter (#1693)
Misc
- Deploy: honor Worker-entry cache setters for ISR deploys (#1821)
- PPR: add PPR fallback-shell render lifecycle tests (#1715)
- Release: commit-driven auto-generated changesets (#1753)
- improve dev error overlay source frames (#1746)
- Skip: omit proven static layouts from RSC transport (#1437)
- PPR: add encodePrerenderRouteParams and match kind exact payload tests (#1714)
- Skip: plumb client reuse manifests through the app request path (#1717)
- App Router: support useRouter bfcacheId semantics (#1588)
Bug Fixes
App Router
- preserve recent segment state with Activity BFCache (#1739)
- hard navigate streamed redirects (#1742)
- refetch same-page search navigations (#1744)
- match streaming metadata error responses (#1794)
- track searchParams access for static bailout (#1788)
- honor per-response dynamic stale times on the client (#1712)
- ensure streamed SSR body ends with (#1532) (#1624)
- emit per-page dynamic stale time metadata (#1711)
- prerender cacheComponents root-param fallback shells (#1702)
Build
- share one RSC compatibility ID across all plugin instances (#1814)
- write BUILD_ID via writeBundle so App Router builds emit it (#1810)
- bundle @vinext/cloudflare into vinext to break dependency cycle (#1797)
- emit Next client runtime manifests (#1735)
Pages Router
- collapse doubled basePath in client asset URLs (#1730)
- make req async-iterable for bodyParser: false (#1479) (#1678)
- run instrumentation-client.ts before hydration (#1474) (#1671)
- cancel in-flight nav on gSSP/gSP data redirect (#1465) (#1691)
Misc
- Check: only flag config options used as property keys (#1778)
- Image: scan image imports via AST instead of regex (#1779)
- Image Imports: normalize meta specifier separators on Windows (#1791)
- Font: resolve next/font/local paths inside node_modules packages (#1780)
- Check: prevent regex stack overflow / hang on very large files (#1776)
- Form: DISALLOWED_FORM_PROPS stripping, file input warning, viewport prefetch, pages-router E2E (#1752)
- Middleware Runtime: normalize trailing slash on plain-URL redirect locations (#1750)
- Routing: correct (.) interception target for nested slot subdirectories (#1751)
- OG: lazy-load @vercel/og to keep it out of the main worker entry (#1774)
- Config: avoid duplicate CJS global shims (#1771)
- Deploy: respect --env flag when invoking build (#1694)
- Pages: render custom errors for notFound results (#1737)
- client HMR dev overlay recovery (#1758)
- Server: define CJS path globals in bundled modules (#1740)
- Link: full-prefetch dynamic routes without loading shells (#1734)
- Skip: centralize final static-layout skip rejection (#1722)
- dev overlay browser sourcemap stacks (#1731)
- i18n: make locale sticky across client navigations (#1407)
- Cache: attach path tags to prerender-seeded entries so revalidatePath invalidates them (#1486) (#1688)
- CSS: preserve distinct media filenames for CSS url() assets (#1725)
- Metadata: omit unused parent arg for cached generateMetadata (#1719)
Performance
- OG: dedupe resvg/yoga wasm in server bundle (#1801)
- Router: lazy-load App Router page and route-handler modules (#1781)
- Build: minify server build environments by default (#1777)
- Utils: skip path separator replace on POSIX (#1766)
Contributors
@vinext/cloudflare@0.1.0
v0.0.55
What's Changed
New Features
- Added experimental
appShellsconfiguration option with validation support - Added support for Sparkle experimental flags:
varyParams,optimisticRouting, andcachedNavigations - Added layout safety observation foundations for improved skip optimization
- Added static layout reuse proof model for better performance analysis
Bug Fixes
- Fixed app router navigation to better align with Next.js behavior
- Fixed Pages Router to properly run
_document.getInitialPropswith renderPage enhancers - Fixed Head component to preserve charset and viewport defaults during client hydration
- Fixed Pages Router to deduplicate in-flight
_next/datafetches by URL to prevent redundant requests - Fixed Head component to match Next.js charset/viewport ordering and properly merge
_document.getInitialPropshead elements - Fixed TypeScript
next.configloading to keep packages externalized - Fixed TypeScript config resolution to properly handle
baseUrlimports fromtsconfig.json - Fixed server-only imports to work correctly from 'use server' modules
- Fixed fnv1a64 hash function to produce consistent fixed-width output
- Fixed App Router to preserve forwarded action redirect wrappers
- Fixed App Router to reuse pending prefetched RSC payloads for better performance
- Fixed App Router to preserve middleware headers on metadata routes
- Fixed Pages Router to preserve
import.meta.urlsource paths - Fixed server-only imports to be properly rejected from client-reachable modules
Performance
- Improved memory management with bounded default cache size and LRU eviction
- Enhanced ISR cache key generation to include i18n context for better cache accuracy
Internal / Chores
- Updated
@vitejs/plugin-rscdependency to version 0.5.27 - Added regression test for parallel slot page-over-default priority
Contributors
v0.0.54
What's Changed
New Features
- Added support for inline CSS parity in App Router
- Implemented
compiler.defineandcompiler.defineServerconfiguration options - Added
compiler.removeConsolebuild option to strip console statements
Bug Fixes
App Router
- Fixed static-sibling info inclusion in SSR responses
- Fixed caching for pages with
revalidate=Infinityorrevalidate=false - Fixed module-only Vite reference errors now properly treated as action-not-found
- Fixed
forbidden()andunauthorized()to properly escalate past intermediate layouts - Fixed client prefetch cache to honor
experimental.staleTimesconfiguration - Fixed routing to treat
@childrenas transparent so explicit pages win over catchalls - Fixed action Set-Cookie header deduplication by name
- Fixed
icons.othermetadata to accept single descriptor format - Fixed
draftMode()reads inside cache scopes - Fixed cookie and header propagation from server actions without JavaScript
- Fixed global-not-found chunk isolation to prevent CSS cascade issues
- Fixed
unstable_rootParamspropagation to actions and route handlers - Fixed spacing in streamed error meta tags
- Fixed autoscroll preservation across page refreshes
- Fixed
updateTagto throw proper error when called outside Server Actions - Fixed source identity preservation for intercepted renders
- Fixed default autoscroll page target behavior
Pages Router
- Fixed
Document.getInitialPropsinvocation so document props reach SSR - Fixed app route detection during prefetch operations
- Fixed custom
pages/500rendering on SSR errors - Fixed non-serializable
getStaticProps/getServerSidePropserror handling - Fixed page script emission with defer attribute in
<head>by default - Fixed
useParamssnapshot stabilization for SSR - Fixed static page responses to return 405 with proper
Allowheader for invalid methods - Fixed 404 responses for invalid
_next/staticrequests in worker deployment
General
- Fixed Next.js script stylesheets to emit proper
<link rel="stylesheet">tags - Fixed
unstable_retryto throw proper Pages Router parity error - Fixed webpack loader side effects to apply
process.envmutations - Fixed build process to inline
process.env.NEXT_DEPLOYMENT_IDfor client and worker bundles - Fixed OpenTelemetry to inject
experimental.clientTraceMetadatainto SSR head - Fixed build to forward
pageExtensionsto Vite resolve extensions - Fixed middleware to stop merging original query into rewrite targets
- Fixed Link component
href/onClickforwarding inlegacyBehaviormode - Fixed React DOM prop name translation to HTML attributes in hoisted scripts
- Fixed route handler Set-Cookie default
Path=/when merging mutable cookies - Fixed routing precedence when both
pages/_foo.tsxandapp/directory exist - Fixed development favicon.ico handling to avoid expensive 404 renders
Performance
- Moved
normalizePathSeparatorsutility to shared path utils - Reused
normalizePathSeparatorsfor static file cache path handling
Internal / Chores
- Added comprehensive test coverage for Link component onClick/preventDefault behavior
- Added regression tests for API route dispatch with middleware
- Added trailing slash enforcement tests for App Router
- Added regression tests for URL-encoded CSS paths
- Added shallow Router.push redirect bypass tests
- Added edge runtime and OG image API route tests
- Added metadata regression test for dynamic icon hrefs
- Added Link component OnNavigate fixture tests
- Added form action regression tests
- Added various other regression and edge case test coverage
Contributors
v0.0.53
What's Changed
New Features
- Added support for
nextConfig.instrumentationClientInjectconfiguration option - Pages Router now consumes
_next/dataJSON endpoint from the client, improving data fetching behavior
Bug Fixes
Security Fixes
- Fixed bodyParser configuration to be properly honored in Pages API routes
- Fixed
x-forwarded-protoheader handling in Edge API runtime whentrustProxyis disabled - Bounded cache key cardinality for
x-vinext-mounted-slotsto prevent potential issues - Kept draft mode secrets out of client-side defines to prevent exposure
App Router
- Fixed RSC navigation scroll targeting to align with Next.js behavior
- Fixed prerender parameter encoding to be properly preserved
- Fixed dynamic route parameter key ordering to match expected behavior
- Fixed history index preservation when external state writes occur
- Fixed metadata file exports for static App Router builds
- Fixed metadata streaming for non-HTML bot requests
- Fixed Edge runtime header application across all App Router response paths
- Fixed Vary header emission on Edge RSC route responses
- Fixed 307 status code preservation on document loads during prerender
- Fixed router.prefetch to properly throw errors on invalid URLs
- Fixed inline beforeInteractive script hoisting above resource hints
Pages Router
- Fixed basePath error route rendering when masked
- Fixed
revalidateReasonparameter passing togetStaticPropsand improved default Cache-Control headers - Fixed Promise-shaped
getServerSidePropsprops to be properly awaited - Fixed dangerous URI scheme detection to throw errors synchronously
- Fixed query string preservation in Link component and router.push calls
- Fixed default Cache-Control headers on
getServerSidePropsresponses - Fixed router push/replace methods to properly return Promise
- Fixed head element attributes to use
data-next-headinstead ofdata-vinext-head
Other Fixes
- Fixed 404 page default copy to match Next.js exactly
- Fixed image optimization to emit proper
/_next/imageURLs - Fixed server action redirects to properly resolve relative URLs
- Fixed Pages Router middleware redirect handling
- Fixed static file cache path normalization on Windows
- Fixed cache request data to be properly marked as private
- Fixed relative URL error handling in NextRequest to throw canonical errors
- Fixed font binding family preservation for local fonts
- Fixed stale build output cleanup before rebuilds
- Added warning when legacy middleware filename is detected
- Added warning for repeated forward slashes in Link href props
Contributors
@james-elicx
@NathanDrake2406
@Divkix
@jgeurts
@manNomi
@shulaoda
@ikxin
v0.0.52
What's Changed
New Features
- Added native App Router route type generation via CLI
- Introduced cache reuse proof system for static layout artifacts with cross-checks
- Implemented
_next/dataJSON endpoint for Pages Router - Added support for
onNavigateprop in Next.js Link components - Exposed
window.next.routeron hydration in Pages Router - Added experimental
appShellsconfiguration plumbing - Added disabled ClientReuseManifest protocol support
Bug Fixes
Router & Navigation
- Fixed route hybrid pages API fallbacks to properly route through pages entry
- Fixed deployment fallback hard navigations in App Router
- Preserved default locale for unprefixed root links
- Fixed parameter isolation for root-params in prerendering and SSR
- Normalized trailing slash behavior for routing parity
- Fixed route priority preservation on middleware rewrite target resolution
- Rendered optimistic loading shells for dynamic App Router navigation
- Rendered loading shell for unlisted
fallback: truepaths in Pages Router
Internationalization (i18n)
- Normalized default-locale paths before route matching
- Stripped locale prefix for API routes
- Honored
locale: falsesetting on rewrites/redirects with proper default-locale redirect - Preserved i18n client root navigation in Pages Router
Middleware
- Allowed server-only imports in middleware
- Preserved query parameters on rewrite
- Fixed redirect protocol with relative Location and x-nextjs-redirect headers
App Router
- Parsed interception route markers in route scanner
- Resolved nested slot pages over default.tsx in parallel routes
- Emitted metadata from parallel route slots
- Prerendered layout static params
- Returned 404 + x-nextjs-action-not-found for missing actions
Pages Router
- Honored
shallowprop on next/link - Avoided getServerSideProps identifier collision during build
- Wrapped edge API requests in NextRequest with bare runtime export support
- Guarded navigation shim against SSR
- Executed edge API routes with Fetch Request
Caching & Performance
- Preserved Next.js cache headers for prerendered app pages
- Wired next/after to Workers ctx.waitUntil in deploy mode
Assets & Styling
- Set default assetsDir to
_next/staticfor Next.js parity - Supported data URL composes in CSS modules
Configuration & Base Path
- Enforced trailing slash configuration in routing and middleware redirects
- Enforced base path scoping on rewrites/redirects/routes
- Applied basePath and route via Pages Router for form soft navigation
- Added deprecation warning for experimental.rootParams
Metadata & URLs
- Matched Next.js metadata image route behavior
- Fixed usePathname to return canonical URL after middleware rewrite
- Warned on blocked javascript: URL navigation
- Passed
params: nullinstead of{}for non-dynamic routes
Error Handling & Flight
- Matched Next.js default error page UI
- Returned flight payload (200) for RSC navigations on redirects
- Awaited top-level await module imports
Performance
- Pre-installed compatible React in deploy harness for faster e2e tests
Internal / Chores
- Migrated font-google tests from fetch hijacking to MSW
- Introduced MSW infrastructure for testing
- Extracted Playwright cache plumbing into composite action
- Split e2e compatibility testing by App Router vs Pages Router
- Refactored navigation runtime topology
Contributors
v0.0.51
What's Changed
New Features
- Implemented assetPrefix config with full Next.js semantics (path-prefix and absolute-URL forms, basePath fallback)
- Added App Router support for app/global-not-found.tsx (Next.js 16 parity)
- Added dev server lock file to prevent concurrent dev sessions
- Added manifest-backed interception topology to the App Router
- Planned App Router navigation from RouteManifest topology
- Promoted intercepted route preservation through the navigation planner
- Recorded App Router render observations in the caching layer
- Classified private and dynamic render downgrades in the cache
- Added static layout proof and variant budget guardrails to the cache
- Added support for declared artifact compatibility sets
- Added /compatibility page backed by D1 + deploy-suite ingest
Bug Fixes
- Matched Next dynamic route semantics for metadata routes
- Applied ancestor templates to title defaults in metadata
- Threaded basePath through metadata, manifest, and redirects
- Emitted streamed redirect and not-found meta tags
- Rendered progressive action not-found HTML on the server
- Threw a typed error for unrecognized server actions
- Modeled RSC redirect and traversal lifecycle
- Hard-navigated stale RSC build payloads
- Hydrated initial root in a transition
- Kept refresh transitions pending until completion
- Refreshed after discarded revalidating actions
- Skipped RSC navigation for hash-only history traversal
- Tracked hash-only traversal metadata
- Guarded stale popstate scroll restoration
- Preserved history metadata for external state updates
- Promoted default slot persistence through route state
- Forwarded searchParams correctly in probePage()
- Matched Next.js RSC Content-Type and 404 plain-text body
- Added x-action-forwarded guard to prevent server action forwarding loops
- Surfaced invalid dynamic usage errors via Flight in dev
- Populated useParams/useSearchParams under the Pages Router
- Included _app module assets in served page HTML
- Shared pages useRouter state through context
- Derived shallow dynamic params from the URL
- Kept next/router import free of popstate side effects
- Supported string paths and missing params in getStaticPaths
- Decoded hash scroll targets
- Threw when App Router context is missing during navigation
- Supported prefetch invalidation callbacks
- Gated intercept matching on Next-URL source pattern
- Aligned visible and intent prefetching for next/link
- Normalised next/link href for trailingSlash config
- Preserved native URI scheme navigation (mailto:, tel:, etc.) in next/link
- Preserved native download clicks in next/link
- Preserved unsafe href click handlers in next/link
- Cleared blur placeholder after image load
- Emitted preload hints for priority images
- Preserved fill positioning for remote images
- Preserved inline styles on remote images
- Excluded ipaddr.js from SSR dep optimizer
- Preloaded <script> sources during SSR via ReactDOM.preload
- Honored async={false} for client scripts
- Deduped concurrent same-src script loads
- Treated draftMode() as non-dynamic; mark dynamic only on enable()/disable()
- Added unstable_catchError, unstable_rethrow, unstable_isUnrecognizedActionError shims
- Matched Next.js font result style semantics
- Attached inner "use cache" call site as cause of nested-dynamic error
- Preserved binary inlined Flight chunks
- Preserved exported client reference subpaths
- Allowed JSX in .js client modules inside node_modules
- Pinned cssTarget so esbuild preserves max-width media-query syntax
- Emitted SSR CSS assets referenced by SSR entry
- Passed sassOptions from next.config to the Vite preprocessor
- Recognized next.config.mts and interop CJS imports in the config loader
- Loaded CJS next.config.js under "type": "module"
- Provided CJS globals when loading next.config.ts
- Parsed route exports with the OXC AST in build report
- Exposed AsyncLocalStorage as a global in the edge runtime
- Cleared browser globals before SSR user modules
- Fixed next build failure for the app-router-playground example
Internal / Chores
- Updated @vitejs/plugin-rsc to 0.5.26
- Bumped Node to 24 in CI for native URLPattern support
- Cached WebKit apt archives and skipped browser install on cache hit
- Added test-path filter input to nextjs-deploy CI
- Defaulted deploy-suite CI to all suites and disabled test retries
- Added basic vinext site
- Updated oxc editor settings
- Added next-env.d.ts to .gitignore
- Clarified middleware.ts deprecation warning is non-fatal
- Deduped push/replace logic in next/router shim
- Consolidated edge globals into installEdgeGlobals() helper
- Shared interception matched-url validation in the router
- Extracted shared static-paths normalization in prerender
- Added regression coverage for next.config runtime value shapes
- Added regression tests for issue #1196 (catch-all route params with basePath + rewrites + middleware)
- Sequenced link.js and importActual to fix link-navigation flake
- Extracted CJS→ESM converter to standalone deploy-suite script
- Handled __dirname, __filename, and require.resolve in CJS→ESM converter
- Injected jiti when deploy-suite test apps use TypeScript config files
- Applied tsconfig.compilerOptions.paths when loading next.config.ts in deploy-suite
- Handled missing optional deps in deploy-suite test fixture configs
- Bumped pinned sass below ^1.70.0 for Vite 8 in deploy-suite
- Created .next/trace before build to avoid ENOENT noise on build failure
- Used correct workers.dev URL for compat ingest
Contributors
v0.0.50
What's Changed
New Features
- Added
window.nextglobal for better Next.js compatibility - Implemented
next/cachestableioexport (deprecatedunstable_io) - Added
useReportWebVitalshook support - Added support for
images.dangerouslyAllowLocalIPconfiguration to reject private IP addresses - Enabled JSX syntax in plain
.jsfiles for Next.js compatibility - Added
waitForAllReadysupport for prerender/ISR parity
Bug Fixes
- Fixed missing runtime default export in
next/appshims - Added
withRouterHOC tonext/routershims - Added
unstable_cacheLifeandunstable_cacheTagtonext/cacheshims - Added placeholder
bfcacheIdtouseRouterhook - Fixed client reference loading issues
- Fixed auto prefetch fetching dynamic app routes
- Fixed dangerous HTML preservation during client sync in head component
- Fixed app router prefetch scheduling alignment
- Fixed redirect digest handling and loading.tsx rendering during cross-route navigation
- Fixed UI preservation during action refresh
- Fixed form state preservation after hydration with
useActionState - Fixed noSSR initial delay state preservation in dynamic components
- Fixed redirect type context preservation
- Fixed draft mode status to be live in headers
- Fixed basePath hash-only page navigation handling
- Fixed config headers preservation on middleware redirects
- Fixed progressive RSC stream truncation errors
- Fixed Next.js dynamic component overload forms acceptance
- Fixed filesystem routes preservation before afterFiles rewrites
- Fixed incomplete loading props in dynamic components
- Fixed RSC vary headers appending in finalizer
- Fixed request API promise identity reuse
- Fixed private IP rejection support in image optimization
- Fixed Suspense fallback streaming during draft mode in App Router
- Fixed identical render fetch deduplication
- Fixed link navigation scheduling as transitions
- Fixed cache key scoping by deployment id
- Fixed non-ASCII character encoding in cache tags
- Fixed action revalidation header emission
- Fixed middleware header preservation on cached pages
- Fixed Windows shell execution for execFileSync calls
- Fixed middleware request body isolation
- Fixed indefinite app page cache entry reading
- Fixed credentials preservation for external override rewrites
- Fixed app page cache bypass in draft mode
- Fixed RSC action notFound HTTP fallback status
- Fixed route group error boundary handling
- Fixed repeated hard-navigation loop prevention
- Fixed NextResponse.next status preservation
Performance
- Improved prerender performance by reusing embedded RSC payload
Internal / Chores
- Added Next.js deploy suite harness for testing
- Promoted mounted parallel slot preservation
- Promoted segment reset semantics
- Promoted same-layout ancestor persistence
- Added root-boundary navigation decision planning
- Exposed RouteManifest semantic facts and segment boundary information
- Enabled stricter promise and error linting rules
- Upgraded pnpm from v10 to v11 with frozen lockfile enabled
- Hardened ecosystem fixture startup for testing
- Extracted internal HTTP header names into shared constants
Contributors
@james-elicx
@hyoban
@NathanDrake2406
@manNomi
@fengmk2
@arpitjain099
@Yoinky3000
@Deepam02
@Divkix
@evil1morty
v0.0.49
What's Changed
Bug Fixes
- Fixed route parameter resolution to correctly prioritize Pages Router route params over query parameters with the same key
- Updated React Server Components initialization to align with React 19.2.6 compatibility requirements
Contributors
v0.0.48
What's Changed
New Features
- Added concurrency control flag for prerendering operations
- Added route graph manifest read model for better routing introspection
- Added artifact compatibility metadata for App Router deployments
- Added navigation trace reason-code system for debugging client-side routing
- Added semantic route graph identifiers for improved routing analysis
- Added visible commit version tracking for browser state management
- Added disabled cache proof model for server-side caching scenarios
- Server startup logging is now displayed during prerendering
Bug Fixes
- Fixed ISR app cache regeneration to be variant-safe, preventing cache inconsistencies
- Fixed SSR external module handling (
ssr.external: true) in App Router configurations - Fixed middleware execution by properly stripping internal headers
- Fixed route refresh and traversal outcomes with proper gating logic
- Fixed
generateStaticParamsvalidation errors to propagate correctly - Fixed server action argument decoding with proper size limits
- Fixed App RSC route-match path canonicalization
- Fixed stale server action commits from being processed
- Fixed Windows deployment issues with wrangler .CMD shim resolution
- Fixed parallel slot route rendering for layout-only configurations
- Fixed dynamic segment name parsing to accept any non-
]characters (Next.js parity) - Fixed metadata merge behavior and Twitter card inheritance to match Next.js
- Fixed nested parallel slot sub-route discovery from layout-only parents
- Fixed
redirect()andnotFound()handling underloading.tsxcomponents - Fixed well-known property protection in thenable params implementation
- Fixed URL parameter decoding using
decodeURIComponent - Fixed invalid HTTP method handling in App route handlers (now returns 400)
- Fixed RSC cache-busting parameter validation
- Fixed
revalidate = falsesupport for App route segment configuration - Fixed non-standard robots directive support via
otherfield - Fixed
generateStaticParamserror handling to catch errors per-source rather than per-loop - Fixed internal Next.js header filtering from inbound requests
Performance
- Improved ISR performance by caching misses from streamed renders
- Optimized client reference preloads by coalescing multiple requests
Internal / Chores
- Updated Next.js dependency version
- Updated React dependency version
- Extensive internal refactoring to dedupe common patterns and utilities across the codebase
- Removed unused deprecated exports from shims
- Enhanced test coverage for App Router navigation lifecycle and root-layout behavior