14 ms·
Webpack allows you to get some dependencies from global window but IIRC it is tricky to set up. That said if it were a web standard then webpack or one if the
by quickthrower2 5y ago
Webpack allows you to get some dependencies from global window but IIRC it is tricky to set up.
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.
- davnicwil 5y agoyep, the way I'm thinking about this it'd certainly be the case that bundlers etc would be aware of the standard and act accordingly.