Next.JS Too many initial javascript requests?

333 Views Asked by At

I asked this in nextjs github discussion but i assume SO is more active. Let me show you my waterfall real quick

enter image description here

After the css (5th request) is loaded there is 16 javascript requests. Then two menifests.

This is blocking some critical assets that wouldve been visible much earlier. I did use image priorities, and few of the assests does load eagerly as expected. But others cant fight the network manager. I tested it multiple times

Why not just load the javascript chunks in fewer requests, instead of bombing my network quota with 10s of <1kb requests T.T

I've briefly seen the announcement of next 13 app dir, and there might've been certain improvements regarding this. But for now i'm kinda stuck because of an ongoing issue #43878

Is there something I might've done wrong? My website has fairly simple structure. It is not script heavy. I would like to note that on development, it doesnt happen, even though each chunk is much much bigger, requests are kept to a minimum.

0

There are 0 best solutions below