voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.42k stars 503 forks source link

Update to webpack 5 Asset Modules #1305

Closed jtpio closed 1 year ago

jtpio commented 1 year ago

Problem

Currently the @voila-dashboards/voila package depends on Webpack 5:

https://github.com/voila-dashboards/voila/blob/c60b6c07a870ef1b03bd2e787c0fdbceef5842bf/packages/voila/package.json#L66

In Webpack 5 most of the url-loader, file-loader and others have been deprecated in favor of the Asset Modules: https://webpack.js.org/guides/asset-modules/

Proposed Solution

We should check if Voila could drop some of the dependencies on the old loaders:

https://github.com/voila-dashboards/voila/blob/c60b6c07a870ef1b03bd2e787c0fdbceef5842bf/packages/voila/package.json#L52

https://github.com/voila-dashboards/voila/blob/c60b6c07a870ef1b03bd2e787c0fdbceef5842bf/packages/voila/package.json#L64

Additional context

For reference JupyterLab implemented this change in https://github.com/jupyterlab/jupyterlab/pull/12350

jtpio commented 1 year ago

This might also be relevant for https://github.com/voila-dashboards/voila/issues/1304

maartenbreddels commented 1 year ago

@mariobuikhuizen is this important for ipyvuetify ? since you had some issues with the fonts?

martinRenou commented 1 year ago

This could probably go into a 0.5.1 release? Should we remove it from the 0.5.0 milestone?

jtpio commented 1 year ago

Probably the only impact would be for extension authors that expect these loaders to be there, which is why it would have been nice to clean that up for the next major release.

Although in the case of Voila the impact would probably be limited as widgets and mime renderers usually don't care about these details.

trungleduc commented 1 year ago

👍 on delivering this change on 0.5.0