unstale

npm / @netlify/plugin-nextjs

@netlify/plugin-nextjs

What changed in @netlify/plugin-nextjs 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

6 breaking8 new APIs and options3 performance5 behavior and defaults52 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@netlify/plugin-nextjs 572 changes

Breaking changes 6

  • Pages router no longer prefetches the revalidation marker.

    5.16.2release notes

  • The build fails if BUILD_ID is missing from the location where the runtime will read it.

    5.0.0release notes

  • The runtime removes the x-nextjs-cache header and uses Cache-Status instead.

    5.0.0release notes

  • Middleware no longer runs at the origin.

    5.0.0release notes

  • Middleware does not run on a rewrite target.

    5.0.0release notes

  • The build checks whether the Next.js version is satisfied and fails when it is not.

    5.0.0release notes

New APIs and options 8

Performance 3

  • Indexes revalidated tags so requests no longer read one manifest per tag.

    5.16.2release notes

  • HTMLRewriter WASM is lazy-loaded only when needed.

    4.41.6, 5.15.6release notesrelease notes

  • Blob gets are conditional when the same blob was fetched before for previous requests.

    5.14.5release notes

Behavior and default changes 5

  • Adds header handling for static service-worker assets.

    5.16.0release notes

  • Eleventy is added at build time to the runtime.

    5.0.0release notes

  • The runtime adds support for monorepositories.

    5.0.0release notes

  • Requests for local images through /_next/image are handled by Netlify Image CDN.

    5.0.0release notes

  • The build checks for a root publish directory.

    5.0.0release notes

Fixes and other changes 50

  • Middleware now runs for i18n locale casing.

    5.16.8release notes

  • Per-page turbopack manifests are copied into the Netlify function.

    5.16.7release notes

  • The internal header is stripped from responses.

    5.16.6release notes

  • Creates the server directory before patching the functions config manifest, avoiding failures when that directory does not yet exist.

    5.16.5release notes

  • Regenerate tag-stale pages during CDN background revalidation.

    5.16.4release notes

  • App router tags are encoded when purging cache.

    5.16.3release notes

  • Seeds the route group cache correctly for the new cache key signature.

    5.16.2release notes

  • Adjusts cache handler keys for compatibility with next@16.3.8.

    5.16.1release notes

  • Preserves initURL.

    5.16.0release notes

  • Awaits the Node middleware require in the generated edge handler template.

    5.16.0release notes

  • Keeps non-ASCII blob keys consistent between build and runtime.

    5.16.0release notes

  • Prevents crashes when server actions exceed the body size limit.

    5.16.0release notes

  • Handles invalid _next/image requests.

    5.15.13release notes

  • Prerendered content is marked as less stale now that the expire setting is enforced when marking content for blocking re-render.

    5.15.12release notes

  • Fixed matching on data routes when the middleware matcher uses allowed paths.

    5.15.11release notes

  • A cache tag is now set for getStaticProps redirects.

    5.15.10release notes

  • Same-url rewrites are no longer optimized when response headers need to be applied.

    5.15.10release notes

  • Handles extractExportedConstValue returning null or a wrapped object in next@canary.

    5.15.9release notes

  • Works around tarball bundling issues with virtual CJS modules for Node.js middleware/proxy.

    5.15.9release notes

  • Fixes resolving CommonJS when a nested package.json is present in Node Middleware/proxy.

    5.15.8release notes

  • Cache tags provided by Next.js for the App Router are now encoded.

    5.15.7release notes

  • Handles Next.js using cdn-cache-control for cacheable responses.

    5.15.5release notes

  • Handles PPR shells for fully dynamic segments on Next.js 16.1.0 and later.

    5.15.4release notes

  • Handles malformed location headers when using the next/navigation redirect API.

    5.15.3release notes

  • De-duplicates blob operation spans.

    5.15.2release notes

  • Adds compatibility for next@16.1.0-canary.19.

    5.15.2release notes

  • Handles node_modules in standalone's dist dir.

    5.15.2release notes

  • Fixed handling of the cacheComponents case that was not producing prerendered .rsc files.

    5.15.1release notes

  • Corrects the middleware nft path in setups using a base directory.

    5.14.7release notes

  • Fixed API routes module parsing for recent Next.js releases.

    5.14.6release notes

  • The AsyncLocalStorage shim is applied only when AsyncLocalStorage is not already available.

    5.14.5release notes

  • A Buffer shim is added when Buffer is not globally available.

    5.14.5release notes

  • The process shim is applied only when process is not already available.

    5.14.5release notes

  • Removes a duplicate fetch span.

    5.14.4release notes

  • Fixes the incorrect middleware nft output path for Next.js 16.

    5.14.4release notes

  • Supports SWR behavior for revalidateTag in the 'use cache' handler.

    5.14.1release notes

  • Usage of a custom distDir is fixed.

    5.0.0release notes

  • Query parameters are handled correctly on data rewrites.

    5.0.0release notes

  • User-defined included_files for functions in netlify.toml are respected.

    5.0.0release notes

  • Cache freshness for ISR content is fixed.

    5.0.0release notes

  • Middleware header mutations are handled correctly.

    5.0.0release notes

  • Multiple matchers for middleware are handled.

    5.0.0release notes

  • Middleware rewrite bodies and loops are handled.

    5.0.0release notes

  • On-demand revalidation is made reliable.

    5.0.0release notes

  • Pages Router notFound pages are handled.

    5.0.0release notes

  • The runtime now works with the pnpm package manager.

    5.0.0release notes

  • A PPR build error is avoided.

    5.0.0release notes

  • The runtime now honors skipMiddlewareUrlNormalize.

    5.0.0release notes

  • Fully static pages receive permanent cdn-cache-control.

    5.0.0release notes

  • An issue preventing unstable_cache from working is fixed.

    5.0.0release notes

@netlify/plugin-nextjs 42 changes

Fixes and other changes 2

  • fetch is reassignable instead of const, fixing cases where reassignment is needed.

    4.41.5release notes

  • self is reassignable instead of const, fixing cases where reassignment is needed.

    4.41.5release notes