You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current state of our application is experiencing decreased performance and a tree shaking problem, primarily stemming from the use of barrel files. This not only impacts the speed and efficiency of our application but also results in errors with both server and client components.
Import a single file from the "@/components" directory.
import{Navbar}from"@/components";
Run the following command:
npm run dev
Observed Behavior:
Importing using a barrel file (@/components), we notice a significant increase in the number of modules being imported. This, in turn, leads to extended compilation times even for a single import.
Expected Behavior:
Without the use of a barrel file (@/components/navbar/Navbar) should result in a more efficient and performant outcome.
NOTE: The specified examples were reproduced using the first compilation without caching.
The text was updated successfully, but these errors were encountered:
Description:
The current state of our application is experiencing decreased performance and a tree shaking problem, primarily stemming from the use of barrel files. This not only impacts the speed and efficiency of our application but also results in errors with both server and client components.
Steps to Reproduce:
Ensure you are working in a project branch that contains multiple components, for example, branch with multiple components.
Import a single file from the "@/components" directory.
Run the following command:
Observed Behavior:
Importing using a barrel file
(@/components)
, we notice a significant increase in the number of modules being imported. This, in turn, leads to extended compilation times even for a single import.Expected Behavior:
Without the use of a barrel file
(@/components/navbar/Navbar)
should result in a more efficient and performant outcome.NOTE:
The specified examples were reproduced using the first compilation without caching.
The text was updated successfully, but these errors were encountered: