We've heard your feedback for improved clarity on how to self-host Next.js with a Node.js server, Docker container, or static export. We've overhauled our self-hosting documentation on:
With Next.js 14.1, we've also stabilized providing custom cache handlers for Incremental Static Regeneration and the more granular Data Cache for the App Router:
Using this configuration when self-hosting is important when using container orchestration platforms like Kubernetes, where each pod will have a copy of the cache. Using a custom cache handler will allow you to ensure consistency across all pods hosting your Next.js application.
For instance, you can save the cached values anywhere, like Redis or Memcached. We'd like to thank @neshca for their Redis cache handler adapter and example.
Next.js with Turbopack now passes 5,600 development tests (94%), 600 more since the last update. You can follow the progress on areweturboyet.com.
We have continued dogfooding next dev --turbo on all Vercel's Next.js applications, including vercel.com and v0.app. All engineers working on these applications are using Turbopack daily.
We've found and fixed a number of issues for very large Next.js applications using Turbopack. For these fixes, we've added new tests to the existing development test suites in Next.js.
For vercel.com, a large Next.js application, we've seen:
Up to 76.7% faster local server startup
Up to 96.3% faster code updates with Fast Refresh
Up to 45.8% faster initial route compile without caching (Turbopack does not have disk caching yet)
In v0.app, we identified an opportunity to optimize the way React Client Components are discovered and bundled in Turbopack - resulting in up to 61.5% faster initial compile time. This performance improvement was also observed in vercel.com.
Turbopack currently has in-memory caching, which improves incremental compilation times for Fast Refresh.
However, the cache is currently not preserved when restarting the Next.js development server. The next big step for Turbopack performance is disk caching, which will allow the cache to be preserved when restating the development server.
We know how critical clear error messages are to your local development experience. We've made a number of fixes to improve the quality of stack traces and error messages you see when running next dev.
Errors that previously displayed bundler errors like webpack-internal now properly display the source code of the error and the affected file.
After seeing an error in a client component, and then fixing the error in your editor, the Fast Refresh did not clear the error screen. It required a hard reload. We've fixed a number of these instances. For example, trying to export metadata from a Client Component.
For example, this was a previous error message:
An example of an error from a fetch call in Next.js 14.
Next.js 14.1 has improved this to:
Errors from fetch calls during rendering now display the source code of the error and the affected file.
The App Router now allows the usage of the native pushState and replaceState methods to update the browser's history stack without reloading the page.
pushState and replaceState calls integrate into the Next.js App Router, allowing you to sync with usePathname and useSearchParams.
This is helpful when needing to immediately update the URL when saving state like filters, sort order, or other information desired to persist across reloads.
For improved observability of your cached data in your Next.js application when running next dev, we've made a number of improvements to the loggingconfiguration option.
You can now display whether there was a cache HIT or SKIP and the full URL requested:
Terminal
GET / 200 in 48ms ✓ Compiled /fetch-cache in 117ms GET /fetch-cache 200 in 165ms │ GET https://api.vercel.app/products/1 200 in 14ms (cache: HIT) ✓ Compiled /fetch-no-store in 150ms GET /fetch-no-store 200 in 548ms │ GET https://api.vercel.app/products/1 200 in 345ms (cache: SKIP) │ │ Cache missed reason: (cache: no-store)
The Next.js Image component now supports more advanced use cases through getImageProps() (stable) which don't require using <Image> directly. This includes:
In Next.js 14.1, we've made 20 improvements to Parallel & Intercepted Routes.
For the past two releases, we've been focused on improving performance and reliability of Next.js. We've now been able to make many improvements to Parallel & Intercepted Routes based on your feedback. Notably, we've added support for catch-all routes and Server Actions.
Parallel Routes allow you to simultaneously or conditionally render one or more pages in the same layout. For highly dynamic sections of an app, such as dashboards and feeds on social sites, Parallel Routes can be used to implement complex routing patterns.
Intercepted Routes allow you to load a route from another part of your application within the current layout. For example, when clicking on a photo in a feed, you can display the photo in a modal, overlaying the feed. In this case, Next.js intercepts the /photo/123 route, masks the URL, and overlays it over /feed.
Next.js is the result of the combined work of over 3,000 individual developers, industry partners like Google and Meta, and our core team at Vercel. Join the community on GitHub Discussions, Reddit, and Discord.
Next.js 14.1 includes developer experience improvements including:
next dev --turbopushStateandreplaceStatesupportnext/imageImprovements:<picture>, art direction, and dark mode supportUpgrade today or get started with:
Copy link to headingImproved Self-Hosting
We've heard your feedback for improved clarity on how to self-host Next.js with a Node.js server, Docker container, or static export. We've overhauled our self-hosting documentation on:
With Next.js 14.1, we've also stabilized providing custom cache handlers for Incremental Static Regeneration and the more granular Data Cache for the App Router:
Using this configuration when self-hosting is important when using container orchestration platforms like Kubernetes, where each pod will have a copy of the cache. Using a custom cache handler will allow you to ensure consistency across all pods hosting your Next.js application.
For instance, you can save the cached values anywhere, like Redis or Memcached. We'd like to thank
@neshcafor their Redis cache handler adapter and example.Copy link to headingTurbopack Improvements
We're continuing to focus on the reliability and performance of local Next.js development:
We plan to stabilize
next dev --turboin an upcoming release with it still being opt-in.Copy link to headingReliability
Next.js with Turbopack now passes 5,600 development tests (94%), 600 more since the last update. You can follow the progress on areweturboyet.com.
We have continued dogfooding
next dev --turboon all Vercel's Next.js applications, including vercel.com and v0.app. All engineers working on these applications are using Turbopack daily.We've found and fixed a number of issues for very large Next.js applications using Turbopack. For these fixes, we've added new tests to the existing development test suites in Next.js.
Copy link to headingPerformance
For
vercel.com, a large Next.js application, we've seen:In v0.app, we identified an opportunity to optimize the way React Client Components are discovered and bundled in Turbopack - resulting in up to 61.5% faster initial compile time. This performance improvement was also observed in vercel.com.
Copy link to headingFuture Improvements
Turbopack currently has in-memory caching, which improves incremental compilation times for Fast Refresh.
However, the cache is currently not preserved when restarting the Next.js development server. The next big step for Turbopack performance is disk caching, which will allow the cache to be preserved when restating the development server.
Copy link to headingDeveloper Experience Improvements
Copy link to headingImproved Error Messages and Fast Refresh
We know how critical clear error messages are to your local development experience. We've made a number of fixes to improve the quality of stack traces and error messages you see when running
next dev.webpack-internalnow properly display the source code of the error and the affected file.metadatafrom a Client Component.For example, this was a previous error message:
Next.js 14.1 has improved this to:
Copy link to heading
window.history.pushStateandwindow.history.replaceStateThe App Router now allows the usage of the native
pushStateandreplaceStatemethods to update the browser's history stack without reloading the page.pushStateandreplaceStatecalls integrate into the Next.js App Router, allowing you to sync withusePathnameanduseSearchParams.This is helpful when needing to immediately update the URL when saving state like filters, sort order, or other information desired to persist across reloads.
Learn more about using the native History API with Next.js.
Copy link to headingData Cache Logging
For improved observability of your cached data in your Next.js application when running
next dev, we've made a number of improvements to theloggingconfiguration option.You can now display whether there was a cache
HITorSKIPand the full URL requested:This can be enabled through
next.config.js:Copy link to heading
next/imagesupport for<picture>and Art DirectionThe Next.js Image component now supports more advanced use cases through
getImageProps()(stable) which don't require using<Image>directly. This includes:background-imageorimage-setcontext.drawImage()ornew Image()<picture>media queries to implement Art Direction or Light/Dark Mode imagesLearn more about
getImageProps().Copy link to headingParallel & Intercepted Routes
In Next.js 14.1, we've made 20 improvements to Parallel & Intercepted Routes.
For the past two releases, we've been focused on improving performance and reliability of Next.js. We've now been able to make many improvements to Parallel & Intercepted Routes based on your feedback. Notably, we've added support for catch-all routes and Server Actions.
/photo/123route, masks the URL, and overlays it over/feed.Learn more about Parallel & Intercepted Routes or view an example.
Copy link to headingOther Improvements
Since
14.0, we've fixed a number of highly upvoted bugs from the community.We've also recently published videos explaining caching and some common mistakes with the App Router that you might find helpful.
<GoogleAnalytics />component tonext/third-parties(Docs)create-next-appis now smaller and faster to install (PR)global-error(PR)redirectnow respectsbasePathwhen used in a server action (PR)next/scriptandbeforeInteractiveusage with App Router (PR)@aws-sdkandlodashfor faster route startup (PR)next devandnext/font(PR)notFounderrors past a segment's error boundary (PR)revalidatevalue is passed (PR)basePath(PR)basePathconfig (PR)revalidatePath(PR)@childrenslots with parallel routes (PR)next buildsummary (PR)rewriteswith an intercepted route (PR)useSearchParamswithoutSuspense(PR)Copy link to headingContributors
Next.js is the result of the combined work of over 3,000 individual developers, industry partners like Google and Meta, and our core team at Vercel. Join the community on GitHub Discussions, Reddit, and Discord.
This release was brought to you by:
And the contributions of: @OlehDutchenko, @eps1lon, @ebidel, @janicklas-ralph, @JohnPhamous, @chentsulin, @akawalsky, @BlankParticle, @dvoytenko, @smaeda-ks, @kenji-webdev, @rv-david, @icyJoseph, @dijonmusters, @A7med3bdulBaset, @jenewland1999, @mknichel, @kdy1, @housseindjirdeh, @max-programming, @redbmk, @SSakibHossain10, @jamesmillerburgess, @minaelee, @officialrajdeepsingh, @LorisSigrist, @yesl-kim, @StevenKamwaza, @manovotny, @mcexit, @remcohaszing, @ryo-manba, @TranquilMarmot, @vinaykulk621, @haritssr, @divquan, @IgorVaryvoda, @LukeSchlangen, @RiskyMH, @ash2048, @ManuWeb3, @msgadi, @dhayab, @ShahriarKh, @jvandenaardweg, @DestroyerXyz, @SwitchBladeAK, @ianmacartney, @justinh00k, @tiborsaas, @ArianHamdi, @li-jia-nan, @aramikuto, @jquinc30, @samcx, @Haosik, @AkifumiSato, @arnabsen, @nfroidure, @clbn, @siddtheone, @zbauman3, @anthonyshew, @alexfradiani, @CalebBarnes, @adk96r, @pacexy, @hichemfantar, @michaldudak, @redonkulus, @k-taro56, @mhughdo, @tknickman, @shumakmanohar, @vordgi, @hamirmahal, @gaspar09, @JCharante, @sjoerdvanBommel, @mass2527, @N-Ziermann, @tordans, @davidthorand, @rmathew8-gh, @chriskrogh, @shogunsea, @auipga, @SukkaW, @agustints, @OXXD, @clarencepenz, @better-salmon, @808vita, @coltonehrman, @tksst, @hugo-syn, @JakobJingleheimer, @Willem-Jaap, @brandonnorsworthy, @jaehunn, @jridgewell, @gtjamesa, @mugi-uno, @kentobento, @vivianyentran, @empflow, @samennis1, @mkcy3, @suhaotian, @imevanc, @d3lm, @amannn, @hallatore, @Dylan700, @mpsq, @mdio, @christianvuerings, @karlhorky, @simonhaenisch, @olci34, @zce, @LavaToaster, @rishabhpoddar, @jirihofman, @codercor, @devjiwonchoi, @JackieLi565, @thoushif, @pkellner, @jpfifer, @quisido, @tomfa, @raphaelbadia, @j9141997, @hongaar, @MadCcc, @luismulinari, @dumb-programmer, @nonoakij, @franky47, @robbertstevens, @bryndyment, @marcosmartini, @functino, @Anisi, @AdonisAgelis, @seangray-dev, @prkagrawal, @heloineto, @kn327, @ihommani, @MrNiceRicee, @falsepopsky, @thomasballinger, @tmilewski, @Vadman97, @dnhn, @RodrigoTomeES, @sadikkuzu, @gffuma, @Schniz, @joulev, @Athrun-Judah, @rasvanjaya21, @rashidul0405, @nguyenbry, @Mwimwii, @molebox, @mrr11k, @philwolstenholme, @IgorKowalczyk, @Zoe-Bot, @HanCiHu, @JackHowa, @goncy, @hirotomoyamada, @pveyes, @yeskunall, @ChendayUP, @hmaesta, @ajz003, @its-kunal, @joelhooks, @blurrah, @tariknh, @Vinlock, @Nayeem-XTREME, @aziyatali, @aspehler, and @moka-ayumu.