An ES module-aware server can avoid that problem by using HTTP Server Push[1], but I haven't seen a production-quality implementation of that, only proof-of-concepts.
Server push is being deprecated because it was far to hard to implement correctly. A server that knows the dependency graph could inject <link rel=modulepreload> into the HTML though.