Open aminlatifi opened 5 months ago
@aminlatifi Thanks for creating this issue. As you can see, the most-sized bundle is _app-e7197....js
.
Unfortunately, we cannot identify any valuable components to remove from this bundle. If there are specific elements you think we could optimize, please let me know.
Thanks @MohammadPCh for preparing this fancy schema. Why do we have _app.tsx while we have index.under ui/dist/esm?
Also, I see design system takes large space. Checked the next
dependency version on its repo and dapp repo, they are not the same. Do you think synching their version will reduce the bundle size by not having two version of next?
What is the contribution of images in this bundle @MohammadPCh ?
@aminlatifi, yes, they are not the same, but I don't think it's a big problem. Let me update and put the nextjs version. Thanks for mentioning it.
@jainkrati, just to clarify, this bundle map relates to JavaScript files. As for images, we utilize the Next.js package, which I'm sure takes care of lazy loading and other optimizations.
This is the result after we update packages for the DApp and UI-design-system.
and this is for our main js:
as you can see there are some opportunities to optimize our app:
@jainkrati As noted in my previous comment, we have two primary methods to reduce the JavaScript bundle size, but both impact the quality of the user experience. What's our decision moving forward?
no @MohammadPCh we cannot impact the quality of user experience. could we try alternatives like caching or splitting some code / 3rd party libraries? if Yes, pls let @RamRamez take it up as you are working on DeVouch
The production page is loaded so slowly since we have a JS bundle bigger than 1MB size.
https://giveth.io/_next/static/chunks/pages/_app-7b7ed37c11059ff3.js
Is it possible to improve it? split it to smaller ones or reduce its size?