reactjs – Using CDN to pull in React and other components for an App
Can someone point me to a definitive way of using react and other components in an app (not just on a web page), calling them from a CDN rather than bundling them.
I do not wish to bundle them since I wish to reduce the bandwidth overhead on my hosting, so the smaller my parts of the app are the better even if the client has to download more.
I followed an example that used UMD thinking I could access from a global context to find that React has moved to ESM. I copied the example from esm.sh and Vite took exception both on loadmaps and trying to load the code using a from and the URI. I tried rolling back the version of React, and nothing loads into the global context (just a load of code from Vite).
Read more here: Source link
