Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1.85 KB

README.md

File metadata and controls

54 lines (31 loc) · 1.85 KB

JupyterLab Rspack

npm

Warning

This is still a work in progress

Build JupyterLab extensions with Rspack (Rust powered Webpack).

jupyterlab-rspack-preview-3.webm

Install

With npm:

npm i --save-dev jupyterlab-rspack

With pnpm:

pnpm i --save-dev jupyterlab-rspack

With yarn:

yarn add --dev jupyterlab-rspack

Usage

If you created your extension from the JupyterLab extension template (https://github.com/jupyterlab/extension-template), replace the jupyter labextension build command with jupyterlab-rspack.

You will need JupyterLab to be installed. We recommend creating a new virtual environment and installing JupyterLab with pip or conda. jupyterlab-rspack will look for JupyterLab to be installed in the environment, to properly populate the list of shared modules when building the extension.

Warning

Some features might still be missing, please check the list of open issues to know more

Context

rspack is a Rust powered alternative to Webpack. It also supports Module Federation, which is used by the JupyterLab extension system.

This means it is possible to use rspack for building extensions, while JupyterLab still uses webpack internally.

For reference the switch to rspack is also being discussed in this issue: jupyterlab/jupyterlab#15035

Future work

This package was created to more easily test building third-party extensions with Rspack, without having to change the existing JupyterLab build system.

In the coming weeks, we will be looking into integrating this in JupyterLab core directly, so building with Rspack becomes the default.