Vercel has announced the release of Next.js 13.5, which offers several improvements: 22% faster local server startup, 40% lessmemory usage, and optimized package imports.
The performance optimization have been driven by focusing on caching or minimizing slow operations, optimizing expensive file system operations, better incremental tree traversal during compilation, moving unnecessary blocking synchronous calls to be lazy, and automatically configuring large icon libraries.
The maintainers have optimized package imports with a new option called “optimize that does the optimizing automatically, replacing the previous way of doing that manually. A number of libraries have already been optimized to only load the modules that your code uses.
The team also made improvements in “next/image” by adding a new experimental function called “unstable_getImgProps().” This will enable advanced use cases like working with “background-image” or “image-set,” working with the canvas “context.drawImage()” or “new Image(),” and working with “<picture>” media queries to implement “Art Direction” or Light and Dark Mode images. Previously in order to do those things, a developer would need to use the “<Image>” component, Vercel explained.
This release also includes new documentation for a number of different areas, including Forms and Mutations, Server and Client Components, Content Security Policy and Nonces, and Caching and Revalidating.
Other new features include support for IPv6 hostnames, draft mode support in the Middleware and Edge Runtimes, and an experimental test mode for Playwright.
Next.js 14.5 includes 438 improvements and bug fixes in total. Read the release notes for the full list of updates