Next.js has optimized package imports, resulting in faster cold boots, faster builds, and improved local development speed. Barrel files, which group and export multiple modules from a single file, can cause slowdowns in importing packages. The new solution, `optimizePackageImports`, automatically maps all imports in barrel
Table of contents
What is a barrel file?What's the problem with barrel files?Can’t we tree-shake it?Our first attempt: modularizeImportsNew solution: optimizePackageImportsMeasuring performance improvementsConclusionSort: