Giter Site home page Giter Site logo

Comments (2)

mneil avatar mneil commented on July 27, 2024

The pyodide version is whatever the user has installed. I opened a PR to note a minimum version of pyodide that works with the plugin. The plugin should support all versions going forward.

I'll open a separate PR with the ability to set the CDN url. I also updated the docs on how the autoCdnIndexUrl differs from setting the IndexURL in loadPyodide

from pyodide-webpack-plugin.

mneil avatar mneil commented on July 27, 2024

On second thought @rth please look at #5 and let me know what you think. Rather than having autoCdnUrl and a boolean value I changed it to micropipCdnUrl with the value as a string. Same default, but now you can change the url. Set the url to "" to use the default from pyodide which is to use "indexUrl".

The reason for this existing at all is that indexUrl in pyodide tries to look up the url where pyodide.js was served. That ends up being localhost or whatever the user's url is when they use pyodide and this plugin to serve pyodide on a webpage. If you then try to use micropip it looks at the same url to find micropip and other pip packages. However, none of those packages are downloaded with the pyodide package.

Setting loadPyodide indexUrl can work but then it serves all files from the indexUrl and ignores all the asm / data packages in the pyodide package. What I wanted to allow is for users to use all files from the pyodide npm package and a different URL only for micropip.

Maybe this is something pyodide core could do better at. But for now supporting it in this plugin for webpack users is fairly trivial.

I have not released this to npm yet. I wouldn't make such a drastic change if I already had. I'll wait to hear feedback on this change before finally releasing to npm.

from pyodide-webpack-plugin.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.