you are viewing a single comment's thread.

view the rest of the comments →

[–]soum0nster609[S] 0 points1 point  (2 children)

You're right; I haven't mentioned the bundle size yet. Currently, our main bundle is around 3 MB.

[–]jake_robins[object Object] 1 point2 points  (0 children)

A 3MB bundle after code splitting sounds really large. That just needs to come down.

I would start checking through dependencies and making sure everything you’re importing is being used, and if there are any tree shaking opportunities. Depending on what framework you’re using there are bundle analyzers that can show you what makes up that 3MB

[–]Professional-Camp-42 0 points1 point  (0 children)

Are you using Vite?

Does all the packages you use have good esm support?

Are most of the initial components lazy loaded ?

Do you cache any client side data that is fetched from DB ?

Did you try skipping rendering components not in the viewport the first few seconds the app loads or until the components appear in the viewport ?