GiftForGood / website

https://www.giftforgood.io
MIT License
4 stars 5 forks source link

[Performance]: Bundle Analysis #450

Open jamessspanggg opened 3 years ago

jamessspanggg commented 3 years ago

Created a bundle analysis that you can view it here: http://gfg-bundle-analysis.surge.sh/

Can also check in PageSpeed to see our performance with reference to google's benchmarks: https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fgiftforgood.io

From the bench mark, we need to:

Potential optimizations (the ones i can think of now):

resize/optimise images before serving as~100kb image is quite big, can consider https://squoosh.app/ Screen Shot 2021-06-12 at 10 59 01 PM
disable react dev tools in production: https://github.com/facebook/react-devtools/issues/191 Screen Shot 2021-06-12 at 11 02 03 PM
In some packages, tree shaking is not working as intended even though they are in esm format We need to change the way we import certain packages, i.e. `@kiwicom` Instead of: Screen Shot 2021-06-12 at 11 11 56 PM Do: Screen Shot 2021-06-12 at 11 12 38 PM
Remove or move certain packages from dependencies -> devdependencies
  • next-images
  • @testing-library (technically can remove since we have no tests