How we optimized package imports in Next.js
Oct 13, 2023

Summary
Introduced `optimizePackageImports` as a new experimental option in Next.js 13.5 to automatically optimize package imports by analyzing barrel files and mapping imports to direct module paths. This replaces the manual `modularizeImports` configuration and offers significant performance improvements in local development speed, production build times, and faster cold starts. The feature handles recursive barrel files and wildcard exports, and is pre-configured for common libraries.