diff --git a/nbsite/pyodide/__init__.py b/nbsite/pyodide/__init__.py index 75f0588..f1501db 100644 --- a/nbsite/pyodide/__init__.py +++ b/nbsite/pyodide/__init__.py @@ -110,6 +110,11 @@ def extract_extensions(code: str) -> List[str]: js += model.__javascript__ if hasattr(model, '__css__'): css += model.__css__ + if hasattr(model, '__javascript_module__'): + js_modules.update({ + jsm.split("/")[-1][:-3]: jsm for jsm in model.__javascript_modules__ + if jsm.endswith('.js') + }) if hasattr(model, '__javascript_module_exports__'): js_exports.update( dict(zip(model.__javascript_module_exports__,