next/dist chunk pretty large in bundle size
Answered
Spinge Bib Sqorpnts posted this in #help-forum
Hello! While running Google's Lighthouse tool on a production build of my project, it reported a chunk with a lot of unused code, and when inspecting the chunk using Bundle Analyzer, it seems that the chunk is entirely made up of
Now, my question is, am I doing something wrong? Or is this necessary overhead just like the entirety of
next/distNow, my question is, am I doing something wrong? Or is this necessary overhead just like the entirety of
react-dom living in the bundle?Answered by joulev
Gzipped size is 41kB, looks normal to me
there are other stuff as well and it is those other stuff that make up the majority of the 329kB
there are other stuff as well and it is those other stuff that make up the majority of the 329kB9 Replies
@Spinge Bib Sqorpnts Hello! While running Google's Lighthouse tool on a production build of my project, it reported a chunk with a lot of unused code, and when inspecting the chunk using Bundle Analyzer, it seems that the chunk is entirely made up of `next/dist`
Now, my question is, am I doing something wrong? Or is this necessary overhead just like the entirety of `react-dom` living in the bundle?
This chunk cannot be removed but it shouldn’t be as big as 329kB. It should be like 50-100kB at most
@joulev This chunk cannot be removed but it shouldn’t be as big as 329kB. It should be like 50-100kB at most
329kb is including some other chunks I'm gonna work on optimizing
@Spinge Bib Sqorpnts That's odd then...
Gzipped size is 41kB, looks normal to me
there are other stuff as well and it is those other stuff that make up the majority of the 329kB
there are other stuff as well and it is those other stuff that make up the majority of the 329kBAnswer
We are interested in the gzipped size because that’s what gets sent over the network.
Ah I see
then the rest of the stuff is material-ui
that stuff is one hell of a thing to optimize
Either way, thanks a lot!