MicroPython as CDN (#1521)

This commit is contained in:
Andrea Giammarchi
2023-06-19 12:06:15 +02:00
committed by GitHub
parent bccd5e3750
commit d6b1c393f6
5 changed files with 6 additions and 5 deletions

View File

@@ -14,7 +14,8 @@ const type = "micropython";
/* c8 ignore start */
export default {
type,
module: () => `http://localhost:8080/micropython/micropython.mjs`,
module: (version = "1.20.0-239") =>
`https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@${version}/micropython.mjs`,
async engine({ loadMicroPython }, config, url) {
const { stderr, stdout, get } = stdio();
url = url.replace(/\.m?js$/, ".wasm");