Next.js 16.4 版本正式发布,在新应用中默认启用 Cache Components 作为新的编程模型1。该功能将在 Next.js 17 成为全局默认配置1。
本次更新包含多项性能和开发体验改进。新增的 ensureStatic 特性支持"navigation"、"prefetch"、"shell"三种模式,以保证页面静态化1,同时引入 navigation() 和 prefetch() 两个新 API 用于精细控制数据加载阶段1。为便于升级,Next.js 团队推出了 next upgrade --agent 命令,支持 AI 代理自动升级应用1。改进的 prefetch 排除机制也优化了应用加载流程1。
Turbopack 方面获得了显著优化:磁盘缓存减小 20-25%1,共享运行时的引入减少了下载大小并改进了缓存命中率1。React Compiler 推出了 Rust 版本,内存使用降低 30%,编译时间减少 15%1。生产环境中 CSS Module 类名进一步缩短,进一步减小包体积1。此外,本版本支持 React 19.3,其中包含稳定的 View Transitions 和 Fragment Refs1。
Next.js 16.4 has been released with Cache Components introduced as the new programming model for all new applications.1 The feature will become the default for the framework starting with Next.js 17.1 This version includes the ensureStatic capability to guarantee page static optimization across three modes—navigation, prefetch, and shell—alongside new navigation() and prefetch() APIs for controlling data loading stages.1
The release brings substantial performance improvements across multiple areas. Turbopack's disk cache has been reduced by 20-25%, while React Compiler now features a Rust implementation that cuts memory usage by 30% and compilation time by 15%.1 Production CSS Module class names have been shortened to further minimize bundle sizes, and Turbopack's shared runtime reduces download size while improving cache hit rates.1 The framework now supports React 19.3, which includes stable View Transitions and Fragment Refs.1
Developer experience enhancements in this version include a new next upgrade --agent command that enables AI agents to automatically upgrade applications.1 Additionally, prefetch exclusion mechanisms have been improved to offer developers finer control over caching behavior.1
评论
还没有评论,欢迎留下第一条。