-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build output result summary #571
Comments
I'd be happy to work on the "add build output" feature. To clarify, the goal is to generate an output message upon completion of a Tuono build that displays the sizes of the emitted JavaScript chunks for each route, particularly those that are lazy-loaded by default. Key.
|
If anyone has any additional suggestions or specific requirements for this feature, please let me know. Looking forward to feedback. |
Yes! Consider that all the routes are always lazy-loaded. IMHO we should list all the routes + all the Could you please propose an output shape before proceed with the implementation? We could take inspiration from other JS frameworks |
If the last output from the build is something like:
then output format should be something like this: Build Complete! Lazy-Loaded Route Chunk Sizes:
This format is clear and organized which makes it easy for users to understand the size distribution of the Js chunks for each route. |
The Explanation of Benefits:
This should help |
Of course I would not include |
Oh! ....maybe this would do Build Complete! JavaScript Chunk Sizes: Route/Component Size /home 45 KB First Load JS shared by all:
Total Build Size: 320 KB Would have love to include a file system view but that would require a build to show that |
Designing a clearer view on canvas, if you could wait a bit |
Your last proposal looks fine to me! Just a few notes:
|
Alright, glad you like the last proposal, will work on the feedback and get to you shortly :) |
I'm not sure about the "total size". What would be the value given to the developer knowing the total across routes? I think the Next.js solution is the best now since we can also split preloaded and server side rendered routes. What is the difference between vendor and common? |
I like also using the ASCII characters to draw the file system. I think it is quite handy |
Hi Valerio, thanks for the feedback! here are my thoughts on the points you have raised -For the total size, that can be removed if it doesn't provide significant value to the developers, but I actually think it's necessary.
|
I think file size can be useful, but the most useful thing from the nextjs one is the first load JS, as well as the JS we actually send to the client for each route. I do like the total build size, although make that clear if it's only the size of the client build. I may be wrong, but I think there is a lot of server stuff in ASCII tree is cool, and definitely useful in large projects, but not a deal-breaker if we don't implement it yet. Also should serverside ( |
So if I understand correctly:
For the layout they get directly displayed in the listing (so not sure if that is necessary) while The point I'm doing is: I wouldn't overcomplicate the implementation with something that is not strictly necessary for the development. For @jacobhq points:
|
Hey Jacob, thanks for your input! here are my thoughts
I never thought about the server.rs part I don't really think these is necessary but if you have an alternate idea you could share, if these should be included. Thank you! |
Hey Valerio, for clarifications and if I understand correctly, vendor is essentially the layout, while common represents third-party libraries. Layouts are directly displayed in the listing, so their necessity in the output can be reconsidered, whereas common libraries can be analyzed through a bundle analyzer. To avoid overcomplicating the implementation, I'll focus on what's strictly necessary for development. The goal is to provide clear and relevant information without adding unnecessary complexity. |
Agree! Let's see what Valerio thinks about the ASCII tree. Other than that, everything looks great :) |
Thanks, Jacob, for your support and feedback! Glad you liked it. Let's see what Valerio thinks about the ASCII tree. Appreciation your collaboration! |
I'm still skeptical about this solution:
|
It's ok to doubtful, however you can just state the important parts and how you really want the implementation to work, and I will get that done without additional work. |
I shared the Next.js output because I think is the more clear solution: Route Size First Load JS
┌ ○ / 6.52 kB 99.6 kB
├ └ css/fa842f4154849998.css 1.38 kB
├ /layout 0 B 93 kB
├ /protected
├ ├ ⦿ / 6.52 kB 99.6 kB
├ └ ⦿ /dashboard 6.52 kB 99.6 kB
├ ○ /404 190 B 93.2 kB
+ First Load JS shared by all
└ chunks/main.js 2.1 kB
○ (Static) prerendered as static content
⦿ (Dynamic) server-rendered on demand IMHO, this has the most important infos. WDYT?
|
Thanks for the clear direction! I'll follow your guidance and focus on the important parts as discussed. Ready to start the implementation. Please let me know if there are any additional instructions or changes needed. |
I think the clarification is better, it just makes the work easy, I just need to get the stuff ready instead of making doubts on what to use. Thanks once again, just waiting for your go ahead. |
My proposal has pretty much everything, IMO. I'm not sure about @jacobhq @marcalexiei WDYT? |
I think so. Also, what do we mean by
If everyone else is good with this, I think that may be best. Then we can give feedback on your actual code, which may be quicker. WDYT? |
I don't have a strong opinion about it. |
I meant the second one.
Yeah, let's not have it for now. Let's see if in the future anyone will raise this need @HabeebullahOpe I'd consider this our champion. Do you need anything else to start working on it? |
Hey Valerio thanks for the clarification and I'm sorry I didn't follow up with last conversation had a simple task to complete. I understand that we mean the size of everything needed for the route gzipped. I'll proceed without including it for now, and we can revisit if there's need in the future. |
When a
tuono build
finish, the user doesn't know what is the size of the emitted JS chunks.We should create an output message with the least of the routes chunk (that are lazy loaded by default).
The text was updated successfully, but these errors were encountered: