# How Next.js reduces the cost of barrel-file imports

Canonical source : [How Next.js reduces the cost of barrel-file imports](<https://sebastien.rigaux.be/en/tech-watch/links/how-next-js-reduces-the-cost-of-barrel-file-imports>)

Vercel explains the hidden cost of libraries that re-export thousands of modules. The article details Next.js import optimizations and their measured effects on builds and cold starts.

- Selected on : 2023-10-24

- Resource publication : 2023-10-13

- Entry updated : 2026-10-14T07:00:28+0000

- Format : Article

- Source language : EN

Original resource : [How Next.js reduces the cost of barrel-file imports](<https://vercel.com/blog/how-we-optimized-package-imports-in-next-js>)

Tags : [Next.js](<https://sebastien.rigaux.be/en/tech-watch/tags/nextjs>) · [Web Performance](<https://sebastien.rigaux.be/en/tech-watch/tags/web-performance>)

Available versions : [Français](<https://sebastien.rigaux.be/veille/liens/comment-next-js-reduit-le-cout-des-imports-depuis-les-barrel-files>) · [English](<https://sebastien.rigaux.be/en/tech-watch/links/how-next-js-reduces-the-cost-of-barrel-file-imports>)

[Back to tech watch](<https://sebastien.rigaux.be/en/tech-watch>)
