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
{{ message }}
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
In frontend development, when working with dependencies that are going going to be shipped to the end user through the network, the size of the dependency is an additional concern as it not only affects the deployment/build times, but also the performance perceived by the end user.
There are various levels of detail/accuracy in estimating the network impact of a dependency:
Simply measure the size of the folder in node_modules
Actually attempt to understand the build system used by the project and accurately calculate to the byte
The last version is very tricky, because it has to take into account different build systems/frameworks, so probably we should aim for the "gzipped entry points" version, but we should do some research to understand if there is some library we can leverage to get a more accurate estimation.
How we could integrate this in CodeGate? Depending on the chosen method, there are some question about how to process the prompt and how to calculate the data, but we could show a message to the end user that suggest smaller alternatives when a huge dependency is recommended by the AI, or when the user directly asks for an example using that dependency.