Next.js 15.4 is here: What’s new and what to expect
Next.js 15.4 is here, and it’s more than just a typical update. This version marks a major milestone for the framework and its growing ecosystem. While each release usually offers useful improvements, this one feels different. It shows real momentum, especially for developers who have been following the evolution of Turbopack closely.
Turbopack has been talked about for a while as the future of frontend bundling, but up until now, it hasn’t quite felt “ready” for serious production use. That changes with 15.4. This new release introduces significant improvements and sets the stage for what’s next, with the arrival of Next.js 16 later this summer.
So, if you’ve been holding off on upgrading, waiting to see if Turbopack is finally stable enough, or simply curious about what’s new under the hood, you are in the right place. In this article, we’ll break down what’s new in 15.4, explore some hidden gems, and take a quick look at what’s ahead in the Next.js roadmap.
Next.js 15.4: Key highlights
Turbopack builds hit 100% test coverage
One of the standout highlights in the Next.js 15.4 release is that the next build --turbopack
successfully passes all 8,302 integration tests for production builds. That’s thousands of edge cases, regressions, and real-world scenarios that are now confidently handled by Turbopack.
It’s a major milestone in the framework’s evolution, bringing this new bundler one step closer to becoming the default. The significance of this milestone becomes even clearer when you consider that Vercel is now using Turbopack to power its high-traffic site. This is a strong signal that Turbopack is no longer experimental; it’s reliable.
What does this mean for developers now?
While 15.4 doesn’t introduce flashy new features for Turbopack, it does bring significant improvements under the hood. A wide range of performance tweaks and stability fixes have made the build process smoother and more reliable. If you tried Turbopack a few months ago and ran into trouble, now’s a great time to give it another shot.
The team’s main focus moving forward is on two priorities: completing bundling optimizations through production chunking and fixing bugs reported by early adopters of the Alpha release. The goal is to officially transition Turbopack into beta with the release of Next.js 16, a milestone that’s now within reach thanks to the groundwork laid in 15.4.
In short, Turbopack has improved considerably. It’s now fast, stable, and on track to become a viable replacement for Webpack in production environments.
Notable changes: Features, fixes, and improvements
Next.js 15.4 isn’t just about Turbopack; it’s packed with practical improvements that solve real problems developers face every day. Let’s break down the changes that are likely to impact your workflow:
Features
Several practical features have been introduced to enhance both the development workflow and production behavior:
- Prefetch invalidation Hook — Introduces an
onInvalidate
callback forrouter.prefetch()
. When cached data becomes stale, this Hook triggers automatic re-fetching, useful for custom navigation components requiring real-time synchronization without relying on Next.js’s built-in<Link>
- Link
prefetch
semantic alias — Introducesprefetch="auto"
as syntactic sugar forprefetch={undefined}
, improving code readability while maintaining the default adaptive prefetch behavior - Metadata support for
global-not-found
pages — Enables full metadata export capabilities inglobal-not-found.js
, allowing customized SEO tags and structured data for 404 pages - New CLI flag —
--debug-prerender
— Introduces the--debug-prerender
flag tonext build
, providing detailed diagnostics and full error stacks to help troubleshoot issues with partial pre-rendering (PPR) and static generation, strictly for development use, not production htmlrewriter
in server externals — Enables use of thehtmlrewriter
package within server runtimes for HTML transformations- Partial pre-rendering support for intercepted routes — Expands the capabilities of partial pre-rendering by supporting dynamic routes with intercepting behavior
Fixes
This release also resolves several important bugs and issues.
- Config module cloning to avoid mutation — Prevents unintended side effects by ensuring configuration objects are safely duplicated
- Prefetch cache consistency — Ensures
staleTime
propagates to seeded prefetch entries and fixed stale prefetch retention for static pages - Fix for
Vary
header reinstatement — Restores proper handling of theVary
response header for better caching behavior - React Compiler adjustments — Fixes inconsistencies in the compiler’s detection of “interestingness” and “usefulness,” thereby improving compilation accuracy
- Fix for edge-case file paths in
launchEditor
— Improves developer experience by gracefully handling unexpected file path formats when using the editor launch utility - Server action fixes — Fixed
bodySizeLimit
errors with non-multipart actions and ensured proper 404 responses for invalid action IDs, thereby improving server action reliability
Improvements
This release also includes improvements to existing features.
- Preserve RSC queries on redirect — Ensures that server component queries are preserved when performing redirects, avoiding broken navigation flows
- Graceful fallbacks for bots — Introduces a specialized error fallback for crawler bot requests to preserve SEO integrity during render failures
- Disallow
unstable_rootParams
in client components — Enforces boundaries between server and client components by disallowing the use of unstable root parameters in client contexts - RSC request validation — Added cache-busting parameter verification to RSC (React Server Components) requests, preventing redundant processing of invalidated queries
- Dependency management — Marked
assert/strict
as an external dependency and upgraded@vercel/og
to 0.7.2 for improved image generation - Streaming metadata — Ensures streaming metadata is always rendered at the top-level position, preserving a valid document structure
- Automatic omission of
searchParam
data inFlightRouterState
before transport — Reduces payload size and avoids unnecessary rerenders in streamed routing
Hidden gems in Next.js 15.4
While the major features capture most of the attention, Next.js 15.4 includes some smaller improvements that may go unnoticed but offer significant value to developers working on specific use cases:
Dev server UX
This adds the ability to restart the dev server directly from the error overlay and indicator preferences, improving iteration speed during debugging. While seemingly small, this enhancement can drastically speed up debugging cycles, especially during local development with hot module replacement issues.
Performance enhancements
The team has made significant efforts in improving static path generation performance and parameter handling. They have also optimized the React Compiler integration by checking files with SWC (Speedy Web Compiler) first, which should result in faster compilation times across the board.
Additionally, the improved CPU profiling support during development (NEXT_CPU_PROF
usage fixes) might not seem exciting, but for teams dealing with performance bottlenecks, being able to capture accurate CPU traces during development is invaluable. This is the kind of tooling that separates professional-grade frameworks from hobby projects.
When and why you should update to 15.4
The decision to upgrade to Next.js 15.4 largely depends on your current setup and specific needs.
If you are currently using an older version of Next.js and have not been closely following the Turbopack development, 15.4 represents an excellent opportunity to experience the performance improvements firsthand. The combination of faster build times and improved development server performance can significantly impact your daily development workflow, especially for larger applications.
However, as with any framework upgrade, it’s wise to test thoroughly in a development environment first. While Next.js maintains excellent backward compatibility, the extensive changes in 15.4 warrant careful testing, particularly if you are using advanced features or have a complex application architecture.
For new projects, starting with 15.4 gives you access to the latest improvements and sets you up for a smooth transition to Next.js 16 when it arrives.
How to upgrade
Upgrading to Next.js 15.4 is straightforward, with the team providing multiple paths depending on your preferences and project setup.
The recommended approach is to use the automated upgrade CLI, which handles dependency updates and can identify potential compatibility issues:
npx @next/codemod@canary upgrade latest
This tool not only updates your dependencies but also runs codemods that can automatically fix common compatibility issues, saving you time and reducing the risk of manual errors.
If you prefer manual control over the upgrade process, you can update the dependencies directly:
npm install next@latest react@latest react-dom@latest
For new projects, you can start with Next.js 15.4 from the beginning:
npx create-next-app@latest
Before upgrading production apps, test the update in a development or staging environment. Focus on build times, runtime performance, and any custom configurations that the changes may impact.
Next.js 16 preview
While Next.js 15.4 is impressive on its own, it’s also serving as a preview for the exciting developments coming in Next.js 16, scheduled for release this summer. The roadmap reveals a clear focus on developer experience and performance optimization:
- Cache components (beta) — Represents perhaps the most significant upcoming feature. This new flag –
cacheComponents
will unify caching features likeuse cache
, Dynamic IO, and PPR. This makes it easier to optimize performance without juggling scattered experimental APIs - Turbopack builds (beta) — This will mark the official transition of
next build --turbopack
to beta status. Given that it’s already passing all integration tests and running production workloads, this beta status should give teams the confidence they need to adopt Turbopack in production environments - Optimized client-side routing — Promises smarter prefetching, improved cache invalidation, and reduced bandwidth usage for App Router navigations. The result should be noticeably faster and more responsive user experiences
- Enhanced DevTools and debugging — The new DevTools will allow you to inspect your app’s route structure and toggle UI components like
loading.tsx
. Experimental forwarding of browser logs to your terminal is also in the works, paving the way for AI-powered debugging workflows - Node.js middleware (stable) — The ability to use the Node.js runtime in middleware, introduced experimentally in 15.2, will be promoted to stable
- Deployment adapters (alpha) — Developers will get finer control over their build and deployment targets by creating custom deployment adapters. This feature opens up possibilities for custom deployment strategies and integration with various hosting platforms
- Minor deprecations and changes — Node.js 18 and AMP will be deprecated, and there will be some modifications to the
$next/image$
APIs with appropriate migration guidance
Preview of the upcoming features
For developers eager to get hands-on experience with Next.js 16 features before the official release, many of these improvements are already available through the canary
channel. You can start experimenting today by enabling specific experimental flags in your next.config.js
:
import type { NextConfig } from 'next'; const nextConfig: NextConfig = { experimental: { // Forward browser logs to the terminal for easier debugging browserDebugInfoInTerminal: true, // Enable new caching and pre-rendering behavior dynamicIO: true, // will be renamed to cacheComponents in Next.js 16 // Activate new client-side router improvements clientSegmentCache: true, // Explore route composition and segment overrides via DevTools devtoolSegmentExplorer: true, // Enable support for `global-not-found` globalNotFound: true, // Enable persistent caching for the turbopack dev server and build. turbopackPersistentCaching: true, }, }; export default nextConfig;
Conclusion
Next.js 15.4 is more than just a minor update; it’s a sign of maturity for the Next.js ecosystem. Achieving 100% integration test compatibility for Turbopack builds, along with numerous improvements and bug fixes, shows that Next.js continues to grow in response to real developer needs.
Whether you’re upgrading an existing app or starting a new project, 15.4 provides immediate benefits and prepares you for what’s coming in Next.js 16. As always, test thoroughly before deploying to production, but if you’ve been waiting for a reason to upgrade, this release might be it.
I hope this article was helpful! If you have any questions or feedback, feel free to reach out to me on X. Happy coding!
The post Next.js 15.4 is here: What’s new and what to expect appeared first on LogRocket Blog.
This post first appeared on Read More