MCPcopy Create free account
hub / github.com/SplootCode/splootcode / tryModuleLoadPyodide

Function tryModuleLoadPyodide

packages/runtime-python/src/pyodide.ts:16–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16export async function tryModuleLoadPyodide() {
17 // @ts-ignore
18 if (typeof loadPyodide == 'undefined') {
19 // import is a syntax error in non-module context (which we need to be in for Firefox...)
20 // But we use module context for local dev because... Vite does that.
21 await eval("import('https://cdn.jsdelivr.net/pyodide/v0.21.3/full/pyodide.js')")
22 }
23}
24
25export async function setupPyodide(urls: string[]) {
26 // @ts-ignore

Callers 2

initializeFunction · 0.90
initializeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected