by quickthrower2 · 4y ago · 0 comments
That said if it were a web standard then webpack or one if the newer bundlers could figure it all out automatically based on your dependencies.
The problem is “who is the source of truth”.
A hash comparison system “get me the library that hashes to xyz” might work, and then you pick your “provider” as a fallback but the browser can pull from cache if the hash matches (even if it came from another provider)
Just thinking of that the problem then is which to cache. How to know “React” is important? I guess browser could keep tally and keep the most often requested ones cached.