Next.js

Next.js: Turbopack CSS Optimization and Testing Improvements

Next.js merged four pull requests on May 18th, 2026, introducing an experimental graph-based CSS chunking algorithm for Turbopack and converting legacy test infrastructure. The changes include significant performance optimizations and improved asset emission handling.

Duration: PT1M58S

https://podlog.io/listen/next-js-36fde2ae/episode/next-js-turbopack-css-optimization-and-testing-improvements-0039966a

Transcript

Good morning. This is your Next.js developer briefing for May 18th, 2026.

Tobias Koppers merged a major addition to Turbopack with the introduction of a graph-based CSS chunking algorithm. This experimental feature is available through the cssChunking: "graph" configuration and aims to improve CSS sharing across pages while maintaining proper ordering. The algorithm uses a weighted directed graph to model CSS dependencies and employs a cost-based approach to minimize both HTTP requests and unnecessary CSS delivery. It's disabled by default and currently Turbopack-only.

Tim Neutkens merged continued test infrastructure modernization, converting additional test suites from the legacy createNext API to nextTestSetup. This follows previous work to standardize the testing framework across the codebase.

Koppers also merged improvements to the turbo-tasks priority system, introducing a new Recomputation priority that schedules recomputed tasks ahead of invalidation phases. This change addresses latency issues when tasks need to be re-run because their outputs weren't available during initial reads.

Finally, Koppers merged a fix to the asset emission process in Turbopack that addresses severe build performance issues. The change reorders operations so assets are written to disk before duplicate checking occurs, preventing potential 30-minute build times caused by eventual consistency issues.

Additional commits included the full implementations of these merged pull requests, spanning changes across 63 files with over 4,000 lines of modifications.

What's next: The graph-based CSS chunking algorithm will likely see further tuning based on real-world usage feedback. The test infrastructure migration continues as part of ongoing maintenance work.

That's your Next.js briefing. Back tomorrow with more updates.