Modular imports for PyScript?

When I look at the examples (e.g. PyScript Hello World), I see that it is not loading pyscript as a script, but instead seems to include its source tree and do modular imports (see below). Is that a supported way of using PyScript?

A couple things here:

From that screenshot, it looks like you’re looking at the Source Map for the code. This isn’t what’s being directly what’s loaded as the page and executed, but rather a human-readable version located at pyscript.js.map. The script executed by the page is, in your example, located at /alpha/pyscript.js. That version is what has been bundled using the rollup module bundler for production.

There’s nothing stopping you from building on top of the PyScript framework by importing individual modules from it, but it might need some reworking of the build system and other necessities (not my area of expertise, sorry). I wouldn’t say that’s a supported way of using PyScript.