react-py
react-py copied to clipboard
load `pyodide_http` only if requests/urllib are used
loading pyodide_http only when it's relevant can make the inital loading faster.
It would make initialisation slightly faster, but downloading the library would only happen once and then be available from the browser cache. In many cases, it's not known if the library is needed to patch http functionality, especially when running arbitrary code from a user.
I can add an optional flag to disable this patch for those who want to optimise loading speed.