Google apps always seem to stand out with an especially large amount of requests.
Does Google use a proprietary module system for these runtime imports?
I've only seen this from afar when using the Maps JS API.
This is the "don't download code you don't run" and "don't ask for data you don't need yet" with smart prefetching and caching. Mostly facilitated using an internal 3 letter framework in Google.
If you want a de-googled approach for "only code you need" check out qwik by Misko Hevery who worked on a bunch f JS related things and a few others. The concept is "resumability".
(not sure if that's what you entirely meant since your example was the maps api)
My only experience with the approaches you mention so far has been code splitting and dynamic imports with webpack.
Yes my example was a bit misleading as it's probably not specific to the maps JS API. Just remembered my casual observation of the network requests when embedding Maps using the JS API.
Also saw that there were lots of tiny cacheable requests and overall great performance.
If you want a de-googled approach for "only code you need" check out qwik by Misko Hevery who worked on a bunch f JS related things and a few others. The concept is "resumability".
(not sure if that's what you entirely meant since your example was the maps api)