It’s this time of the year that I need help with minimalizing bundle size. (I opened a post before and I was mentioning this, so here it is).
I finish the app and I cant reduce the bundle size below 240kB. Google Lighthouse is telling me that I should be able to reduce the size to 140kB.
I started investigating. I’m using RollupJS for bundling into module.
And after I added the Rollup analyzer I noticed that: I got stuff that I will never use:
Particles (BTW it imports StandardMaterial so if you want to use only NodesMaterials instead if you use it you will bundle StandatdMaterial for no reason)
and some more that I can’t get rid of but I do not use. They just over-blow my bundle. Tree shaking is not getting rid of them as well.
I use version 4.2 and a lot of times I saw opinions that someone said to build a version 4.2.1 with some improvements. (I was one of them as well for the fix that is in version 5 but not 4 for passive event listeners).
So how can this be fixed? Cause when I did a test build with version 5 my bundle size went from 240lkB to 290kB and Lighthouse is not liking this at all.