If anybody is interested in this or are aware of prior work, please let me know by commenting!
) By using googles metric this might optimize search engine rating for google as well as they are probably using the same system to analyze while crawling.
) I'm not saying that it's easy, but this is very there are optimization that are left to be done
Also this method would work with code within the modules itself. Webpack works on a module basis, i.e. import statements. My approach would rather look at the code on a line or function basis and exclude unused code within the module itself. Every page is ran through in different browser and what the client actually is executing is measured instead of a higher level dependency graph.
One thing that could happen with the webpack approach is that if say the frontpage js bundle and the login js bundle is different the bundles have to be downloaded separately the cache is not really utilized.