Fix #2404 - avoid throwing on string config (#2405)

This commit is contained in:
Andrea Giammarchi
2025-11-25 09:26:14 +01:00
committed by GitHub
parent 7785e17bb5
commit 7afe5c55e1
7 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
{
"packages": ["numpy"]
}

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../../dist/core.css">
<script type="module" src="../../../dist/core.js"></script>
</head>
<body>
<script type="mpy">
from pyscript import PyWorker
worker = PyWorker("./worker.py", type="pyodide", config="./config.json")
await worker.ready
</script>
</body>
</html>

View File

@@ -0,0 +1,5 @@
import numpy
from pyscript import document
document.body.append(numpy.__version__)
document.documentElement.classList.add("done")