Next.js

Next.js: Runtime Optimization and App Shell Extraction

Next.js focused heavily on reducing bundle sizes and improving performance, with major changes to make Turbopack's runtime more selective about included features. The team also landed a significant app shell extraction feature for partial prerendering alongside several stability fixes.

Duration: PT2M12S

https://podlog.io/listen/next-js-36fde2ae/episode/next-js-runtime-optimization-and-app-shell-extraction-c2f1b03b

Transcript

Good morning, it's June 5th, 2026. Yesterday's Next.js development centered on making the framework more efficient by shipping less code when features aren't needed, while also advancing partial prerendering capabilities.

The biggest theme was runtime optimization in Turbopack. Two substantial changes, PR 94372 and 94376, moved worker helpers and top-level async support out of the default runtime bundle. Instead of shipping these features to every application, they're now only included when actually used. The async module support alone represents about 10% of the runtime size. This is a meaningful shift toward more selective bundling that should reduce payload sizes for many applications.

The second major development was app shell extraction for static prefetches in PR 94095. This enables the client to extract reusable app shells from fully static prerendered pages without any server runtime cost. The server now sends a byte offset indicating which part of the stream corresponds to the reusable shell. This is a concrete step forward for partial prerendering, though it doesn't yet cover per-segment prefetch responses.

Several stability improvements also landed. A debug channel fix in PR 94462 resolved a React 18 compatibility issue that was breaking app rendering in development. The problem stemmed from module imports trying to access React DOM paths that don't exist in React 18. There was also a security update, bumping the vendored lodash from version 4.17.23 to 4.18.1 to address CVE-2026-4800.

Looking ahead, the runtime optimization work suggests Next.js is prioritizing bundle efficiency, while the app shell extraction lays groundwork for more advanced partial prerendering features. These changes should make applications both smaller and faster.

That's your Next.js update for June 5th.