Skip to content

Commit b83ba18

Browse files
committed
Use PUBLIC_URL to import the core
1 parent 91743ed commit b83ba18

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/python.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ globalThis.py = await window.loadPyodide().then(async (py) => {
88
py.setDebug("production" !== process.env.NODE_ENV);
99
await py.loadPackage("micropip");
1010
const micropip = py.pyimport("micropip");
11-
const coreUrl = new URL(`/py/${wheelInfo.fileName}`, window.location.href);
12-
await micropip.install(coreUrl.href);
11+
const coreUrl = `${process.env.PUBLIC_URL}/py/${wheelInfo.fileName}`;
12+
await micropip.install(coreUrl);
1313

1414
return py;
1515
});

0 commit comments

Comments
 (0)