The Next.js team has released version 16.5. According to the developers’ measurements on the Vercel dashboard, on a machine with 30 cores and 60 GB of memory, cold compilation became about 4.2 times faster than in version 16.4.6 and uses 38% less memory. Full production builds from a cold start run twice as fast, and the disk cache is 14% smaller.
On five other Vercel applications, including nextjs.org, peak memory usage dropped by 6–27%, and disk cache size by up to 23%. Turbopack is the bundler that Next.js uses to compile a project.
Cache across deployments
Previously, after every new deployment the cache of all functions with the 'use cache: remote' directive was reset, because the cache key included the build ID. Now Turbopack builds the key from the function itself, the code it depends on, and the values of the environment variables it reads. If none of these have changed, the new version of the site can reuse the entries of the previous one.
Entries still expire and are revalidated as before. If Turbopack cannot determine all of a function’s dependencies, for example when process.env is read dynamically (process.env[variable]), Next.js falls back to a key tied to the deployment.
Other changes
- The
next build --analyzecommand creates a bundle size report during a regular production build, without a second compilation; the report exactly matches what will go to production. - The Turbopack garbage collector, which appeared in 16.4 as the experimental
turbopackGcflag, is now enabled by default, so the cache grows only with the size of the application. - The
prefetch="navigation"attribute on an individual<Link>preloads all of the page’s cached content, even content that is normally deferred until the click because ofawait navigation(). - The
next upgrade --cicommand sets up a GitHub Actions workflow: it checks for a new version every day, and an AI agent (Codex or Claude Code) updates the application and opens a pull request for review.
Experimental features
Experimental support for Route Handlers in Go has appeared: Turbopack compiles a route.go file in the App Router into a native executable. Go 1.24 or newer and the goRoutes option enabled are required.
A safe image optimization mode for next/image is also available via experimental.imgOptSafeMode. It combines memory-safe decoders, process isolation and a seccomp sandbox on Linux to reduce risks when processing untrusted images. On platforms with their own image optimization, such as Vercel, the option may be ignored in production.
You can upgrade with the next@latest command or via next upgrade --agent.
Source: Next.js Blog