| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@alexmojaki @leopsidom @ryanking13 could someone review this? I have a plan to fix #2255 but I would prefer to merge this first. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks, @hoodmane, LGTM and sorry for the late review. Please update the changelog.
Sorry, something went wrong.
|
Ideally it feels more natural to let rollup handle different target with the same input. But since we have a preference to use loadPyodide as global, this LGTM. |
Sorry, something went wrong.
| @@ -0,0 +1,3 @@ | |||
| import { loadPyodide } from "./pyodide"; | |||
| export { loadPyodide }; | |||
There was a problem hiding this comment.
I think we don't need to export loadPyodide if we are attaching it to global.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not even sure what export does for umd, but this is redundant.
Sorry, something went wrong.
Can you explain what you mean? I think we discussed this before but I'm still not sure what the alternative looks like. |
Sorry, something went wrong.
|
In particular, we want the non-es6 pyodide.js to be loadable in a <script> tag, where I think there is no option except to attach loadPyodide as a global? |
Sorry, something went wrong.
Yeah, it might be a while ago. But I think if default to rollup config, the alternative is to give the global object a name such as pyodide and then reference loadPyodide from it as pyodide.loadPyodide. |
Sorry, something went wrong.
With current implementation, it's possible to use pyodide.loadPyodide if we do not attach loadPyodide to global. But we need to change the name in rollup config to pyodide. |
Sorry, something went wrong.
|
But since you are looking to fix this issue: #2255. It's likely there will be some changes made to the API. So it makes more sense to consolidate it over there. |
Sorry, something went wrong.
|
Right, well as I said before, I don't love having to call it pyodide.loadPyodide. Maybe we should just leave the global variable in the umd file and encourage people to use the es6 module. |
Sorry, something went wrong.
|
Thanks for the reviews @leopsidom and @ryanking13! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.