19 ms·
This sounds similar to https://esm.sh/ https://esm.sh/
by shepherdjerred 2y ago
This sounds similar to https://esm.sh/ https://esm.sh/
- curtisblaine 2y agoUnfortunately singleton peer dependencies (like react) are quite complicated with esm.sh. When esm.sh rewrites a module to import react from the cdn, it kinda "decides" which version of react is it at the moment the module is built on the CDN for the first time. That's why react is "special" and gets a stable build in esm.sh (essentially pointing to a fixed version no matter which version you specify): to avoid the dreaded "two copies of react" error.
- crabmusket 2y agoYep definitely. There are a few of these like JSPM that help convert libraries into browser-importable URLs.