Support federated extensions
See original GitHub issueProblem
The webpack build(s) already take(s) a long time. As a site publisher adds additional extensions, this will take longer until it just doesn’t work anymore: for example, while published on npm, ipydrawio doesn’t reliably work as a source extension because… 5000 files. Further, and for the reason above, unless they really need it, I don’t think a lot of extension authors will even be testing source installs.
Proposed Solution
Add federated_extensions
to pageInfo
and the machinery to load them.
Indeed, the jupyterlite kernels, etc. would likely be useful outside of a jupyterlite install, e.g. when someone is building content, so they gain access to things like jupyter-lsp, etc. but that’s probably for another day, and maybe counterfeited by a preview mode on #41, if the complexity is too high (because patching ServiceManager).
Additional context
For pure js builds, provide some mechanism to get sdists from pypi.io by URL (or locally), unpack them, copy the files into lab/labextensions/
.
For python-driven builds (#41), be able to copy things from $PREFIX/share/jupyter/labextensions
to lab/labextensions
(https://github.com/jtpio/jupyterlite/issues/16#issuecomment-821980005).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top GitHub Comments
Some ideas for having server extensions as federated extensions:
cookiecutter-jupyterlite
repo similar to https://github.com/jupyterlab/extension-cookiecutter-ts (maybe a fork?), but forJupyterLiteServerPlugin
plugins (example: https://github.com/jtpio/jupyterlite/blob/main/packages/javascript-kernel-extension/src/index.ts)$PREFIX/share/jupyter/liteextensions
jupyterlite
cli would also be able to install these extensions from$PREFIX/share/jupyter/liteextensions
by moving them tolite/extensions
@jupyterlab/builder
under the hood. Maybe we can even leverage the--core-path
option to not have to add anotherlite
layer on top of it.pip install
it when they follow a Python drivn deploymentI think we’re pretty good here, I’ll open (ha) the OpenAPI thing as a separate issue.