Skip to content

Commit 1f9223c

Browse files
committed
Augment Pyodide with pre-fetched packages details
1 parent 59c140e commit 1f9223c

File tree

6 files changed

+7726
-139
lines changed

6 files changed

+7726
-139
lines changed

esm/interpreter/pyodide.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,14 @@ export default {
7474
`https://cdn.jsdelivr.net/pyodide/v${version}/full/pyodide.mjs`,
7575
async engine({ loadPyodide, version }, config, url, baseURL) {
7676
progress('Loading Pyodide');
77+
let graph;
7778
let { packages, index_urls } = config;
78-
if (packages) packages = packages.map(fixedRelative, baseURL);
79+
if (packages) {
80+
packages = packages.map(fixedRelative, baseURL);
81+
progress('Loading Packages Graph');
82+
graph = await import(/* webpackIgnore: true */'./pyodide_graph.js');
83+
progress('Loaded Packages Graph');
84+
}
7985
progress('Loading Storage');
8086
const indexURL = url.slice(0, url.lastIndexOf('/'));
8187
// each pyodide version shares its own cache

0 commit comments

Comments
 (0)