Frontend Architecture
Code splitting: multiple-choice review
Six questions that cut across the whole unit. None ask for a definition — each mirrors a splitting decision you make under a real latency budget, where the wrong call regresses LCP or re-downloads React on every deploy.
Confirm you can connect the latency trade, the route-vs-component rule, the request waterfall, vendor-chunk caching, and resource hints — the synthesis the overview built toward.
A team wraps every panel of a dashboard in React.lazy. The analyzer shows 40 chunks, none over 12 KB, yet field LCP on 4G regresses from 2.3s to 4.1s. What is the dominant cause?
You can split exactly one thing on a page. Which candidate is the highest-leverage, lowest-risk split?
A reviewer claims 'HTTP/2 multiplexing makes bundling obsolete, so split as granularly as you like.' Where is this wrong?
Returning users re-download React on every deploy even though dependencies never changed. Most likely cause?
A 180 KB interactive viewer sits below the fold and opens only when the user scrolls to it. Best loading strategy for a 4G audience?
What is the practical difference between rel='preload' (or modulepreload) and rel='prefetch' for chunks?
The through-line of the unit is one decision tree: splitting is a latency trade, not a free size cut, so the question is always how many sequential round trips you added to the critical path. Split per route by default (bounded waterfall, framework default); split a component only if it is heavy and off the first paint; never split small above-the-fold content. The waterfall — not byte count — is what loses on 4G, and HTTP/2 does not save it. Defend caching with a content-hashed vendor chunk and the runtime split out, and use preload for current-critical chunks, prefetch for likely-next navigations.