Replies: 4 comments
-
Hey! It's been a while since this discussion created. We would really appreciate if this feature landed in one of the foreseeable future releases. Cheers. @sergiodxa |
Beta Was this translation helpful? Give feedback.
0 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
+1 this would be extremely helpful and is the main thing i miss from next js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal
Show build stats per route with the size of the JS each route will load if it was the first accessed route.
Background
Right now, there's no built-in way to know the amount of JS a route may need other than opening it in, you could use the source maps to analyze them but a simplified version at build could be better.
Use Case
It's helpful to know how much JS you are going to actually load on each page (if it's the first one) and realize "hey this page which is fairly static is loading a ton of JS, maybe something is off with my imports" and fix it or at least debug more with other tools to inspect source maps.
API/Example
When building the app the developer could add a flag to generate these build stats
The result could be something similar to what Next.js shows
The stats should be behind a flag because collecting them could slow down the build, so it's better if it's opt-in.
An extra step could allow the stats to highlight routes over a configured size limit, useful to set a performance budget and know when we're near to reach it or we already reached it.
Now, the stats result could highlight the routes which will load more than 150kb (per the configuration) of JS.
Beta Was this translation helpful? Give feedback.
All reactions