Bundle Analyzer
I would love for a service/product that could take my project (NextJS/ReactJS) and analyze the bundle size and the provide me with some actionable tasks!
I struggle to fix this issue and I know my project does suffer from a large bundle - people have said.
I have used @next/bundle-analyzer
which prints a pretty picture but no idea what to do.
From: https://launchafrica.io/
I have followed many blogs about what one can do but nothing I do seems to change anything!
Anyone have some advice here? Anyone know some quick things I could do?
Does seem weird that you need this much JavaScript for the landing page and all of those chunks get loaded…. (Not a next user tho)
Purging CSS will also help with performance
OK so the bigger the box the more space it takes up in the bundle. Zoom in on the bigger ones and ask yourself the following…
- Do you NEED this dependency.
- Is the dependency installed in the right place (devDependencies vs dependencies)
- Do you NEED everything this dependency provides or can you just import the functions you actually use.
Looking at the image you provided it seems there is quite a bit of duplication going on so I would look how you have things configured as something is wrong.
Please sign in to leave a comment.