Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sounds similar to https://esm.sh/


Unfortunately 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.


Yep definitely. There are a few of these like JSPM that help convert libraries into browser-importable URLs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: