Turbopack in Next.js 16.3 adds development memory eviction, persistent file cache for builds, experimental Rust React Compiler, and `import.meta.glob` support.
As the Next.js 16.3 Preview nears a stable release, we're sharing a series of posts about what's inside. Our previous posts cover new Instant Navigation features and the latest AI improvements . This third post details the latest improvements to the Turbopack bundler within Next.js.
With Next.js 16.3 , Turbopack's latest stable release focuses on compiler performance. Many of the newest features are centered around reducing CPU and Memory usage, speeding up build times, and improving runtime experience.
Turbopack's core design is focused on incremental compilation. By caching the work it previously did, it avoids recompiling files that haven't changed.
This is an excerpt. The full article is published by Next.js Blog.
Answers to common questions regarding this article's topic, architecture, and practical applications.
As the Next.js 16.3 Preview nears a stable release, we're sharing a series of posts about what's inside. Our previous posts cover new Instant Navigation features and the latest AI improvements. This third post details the latest improvements to the Turbopack bundler within Next.js.
How It Works
Turbopack's core design is focused on incremental compilation. By caching the work it previously did, it avoids recompiling files that haven't changed. When developing large Next.js applications, this means compile time is proportional to the size of your changes, not the size of your route. In pursuing this design, we made a very deliberate trade-off: caching more results in memory, for reduced CPU usage. Since Turbopack first launched, though,
How It Works
Turbopack now supports the Vite-compatible import.meta.glob API: const posts = import.meta.glob('./posts/*.mdx');
This API can import all modules that match this pattern, without hardcoding their names. The result is an object keyed by the matching file paths. By default, each value is an async function that loads the module: for (const path in posts) {
const post = await posts[path]();
}
Use eager: true to import each match immediately: const
General
By analyzing the performance of Turbopack in large Next.js apps at Vercel, we identified a number of performance improvements that could benefit all Turbopack users. Much of that investigation centered around making HMR subscriptions more efficient. One significant change streamlined the tracking of chunks that are loaded on a page. By reducing multiple subscriptions to a single one, we were able to reduce dev server cold start by over 15% on com
General
Persisting the Turbopack memory cache to disk has been speeding up next dev sessions since the 16.1 release. After months of hardening in production with Vercel's own sites, the same persisted cache is now available for next build, enabled by default. With persistent disk cache, builds can take advantage of previously computed work and reduce the time it takes to compile your static assets. When Turbopack sees the cache at the start of a build, i