Is there way to fetch other chunks with main.js?
I am working on some performance improvement. When I check my performance profile, It fetches main.js which is not small. Then, it start to fetch other required chunks.
I looked at the site using Nextjs and it seem to fetch small buildManifest and start to fetch all he required chunk at the same time.
My site is waiting for the main.js because of my webpack setup or you believe I have wrong setup with react-imported-component?
NextJs works a little different from other applications, having something like "full per-page builds", especially in dev mode.
The "normal" application is expected to have "entrypoint code" (aka main), with possible separated "vendors" bundle, and a pack of small chunks required to serve a particular request. Your job in this case is basically keep that entry point as small as possible.
Speaking of "build manifest" - all you need is to set runtimeChunk and webpack will extract it as a separate file. However in this case you will need to have some extra tool to "combine everything back" or loading will never complete.
I personally use webpack-imported
That means that even though I separate the manifest file, loading chunks still depends on main chunk?