notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Add webpack config for building prod

Open jtpio opened this issue 1 year ago • 3 comments
trafficstars

Follow the JupyterLab config: https://github.com/jupyterlab/jupyterlab/blob/main/dev_mode/webpack.prod.config.js

To check:

  • https://github.com/jupyterlab/jupyterlab/pull/9776

Fixes #7373 Fixes https://github.com/jupyter/notebook/issues/7221

jtpio avatar May 03 '24 16:05 jtpio

Binder :point_left: Launch a Binder on branch jtpio/notebook/webpack-prod

github-actions[bot] avatar May 03 '24 16:05 github-actions[bot]

This may also be related to the following issues:

  • https://github.com/jupyter/notebook/issues/6080
  • https://github.com/jupyter/notebook/issues/5963

jtpio avatar May 16 '24 13:05 jtpio

Postponing to 7.3.0, as this likely involves using the html-webpack-plugin to properly inject the script tag with the cache busting hash string. We might also want to take the opportunity to restructure the build so each page has its own app and bundle, similar to the approach taken in JupyterLite:

  • https://github.com/jupyterlite/jupyterlite/tree/main/app/tree
  • https://github.com/jupyterlite/jupyterlite/tree/main/app/consoles
  • https://github.com/jupyterlite/jupyterlite/tree/main/app/notebooks

Instead of the current approach which currently builds a single bundle, and activate a specific list of plugins on each page.

jtpio avatar May 16 '24 13:05 jtpio