TLDR Web Dev · ARTICLES & TUTORIALS
SPEEDING UP THE JAVASCRIPT ECOSYSTEM- THE BARREL FILE DEBACLE
Summary from the TLDR Web Dev newsletter
Barrel files are files that only export other files. They are used to reduce the number of import statements in a project. Barrel files are a common cause of performance issues in JavaScript projects, especially large ones. Importing many files through a web of barrel files can significantly increase module loading times, affect test runners' performance, and cause linting times to increase dramatically. Getting rid of barrel files can make many tasks run 60-80% faster.