Next.js Discord

Discord Forum

next/dist chunk pretty large in bundle size

Answered
Spinge Bib Sqorpnts posted this in #help-forum
Open in Discord
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?
Answered by joulev
Gzipped size is 41kB, looks normal to me :thinkies: there are other stuff as well and it is those other stuff that make up the majority of the 329kB
View full answer

9 Replies

@joulev This chunk cannot be removed but it shouldn’t be as big as 329kB. It should be like 50-100kB at most
That's odd then...
@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 :thinkies: there are other stuff as well and it is those other stuff that make up the majority of the 329kB
Answer
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!