





















Next.js 14.1 includes developer experience improvements including:
next dev --turbopushState and replaceState supportnext/image Improvements: <picture>, art direction, and dark mode supportUpgrade today or get started with:
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.
We're continuing to focus on the reliability and performance of local Next.js development:
We plan to stabilize next dev --turbo in an upcoming release with it still being opt-in.
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:
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.
webpack-internal now properly display the source code of the error and the affected file.metadata from a Client Component.For example, this was a previous error message:

Next.js 14.1 has improved this to:

window.history.pushState and window.history.replaceStateThe 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.
Learn more about using the native History API with Next.js.
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 logging configuration option.
You can now display whether there was a cache HIT or SKIP and the full URL requested:
This can be enabled through next.config.js:
next/image support 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-image or image-setcontext.drawImage() or new Image()<picture> media queries to implement Art Direction or Light/Dark Mode imagesLearn more about getImageProps().
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/123 route, masks the URL, and overlays it over /feed.Learn more about Parallel & Intercepted Routes or view an example.
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 to next/third-parties (Docs)create-next-app is now smaller and faster to install (PR)global-error (PR)redirect now respects basePath when used in a server action (PR)next/script and beforeInteractive usage with App Router (PR)@aws-sdk and lodash for faster route startup (PR)next dev and next/font (PR)notFound errors past a segment's error boundary (PR)revalidate value is passed (PR)basePath (PR)basePath config (PR)revalidatePath (PR)@children slots with parallel routes (PR)next build summary (PR)rewrites with an intercepted route (PR)useSearchParams without Suspense (PR)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.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。