Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch fromwebpack torspack for bundling#16005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jasongrout merged 27 commits intojupyterlab:mainfromjtpio:rspack
Dec 11, 2025
Merged

Conversation

@jtpio
Copy link
Member

@jtpiojtpio commentedMar 15, 2024
edited by jasongrout
Loading

References

#15035

List of supported webpack plugins:https://www.rspack.dev/plugins/webpack/

Code changes

WARNING in ./node_modules/@jupyterlab/mathjax-extension/style/fonts.css  ⚠ Module parse warning:  ╰─▶   ⚠ css: Deprecated '~'        │ '@import' or 'url()' with a request starts with '~' is deprecated.
  • Use the default Rspackexperiments.css (set totrue by default), or keep the currentcss-loader,style-loader,mini-css-extract-plugin. Might needsupport mini-css-extract-plugin web-infra-dev/rspack#3210
  • Update extension migration guide
  • Update more docs?
  • Check/fix watch mode for linked extensions. In other words, do we need to uncomment theWPPlugin.FilterWatchIgnorePlugin indev_mode/webpack.config.js?
  • Fixjlpm build:dev:prod:minimize:report

@jasongrout used Claude Code to assist in this migration

User-facing changes

None

Backwards-incompatible changes

Should be none for most users and administrators using a stock JupyterLab with prebuilt extensions. Rspack supports module federation so existing extensions are compatible with JupyterLab built with Rspack and don't need to be updated.

Below is a screenshot showing JupyterLab running in dev mode from this branch, picking up thejupyterlab-execute-time prebuilt extension:

image

Other references

Migrating to rspack:

martinRenou reacted with thumbs up emojimartinRenou reacted with hooray emojixc2, chenjiahan, martinRenou, and Timeless0911 reacted with heart emojifcollonval, h-a-n-a, chenjiahan, martinRenou, and Timeless0911 reacted with rocket emojimartinRenou and Gehbt reacted with eyes emoji
@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch onbinder, follow this link:Binder

@jtpio
Copy link
MemberAuthor

Opening early to:

@jtpio
Copy link
MemberAuthor

Some first numbers runningjlpm build:dev:prod:release:

rspack

image

webpack

image

krassowski reacted with heart emoji

@erkin98
Copy link
Contributor

Hi@jtpio , how to migrate custom widget library with custom webpack.config.js?

@jtpio
Copy link
MemberAuthor

jtpio commentedApr 10, 2024
edited
Loading

Rspack 0.6.0 now supports it:https://www.rspack.dev/blog/announcing-0.6.html#built-in-support-for-mini-css-extract-plugin

@FoSuCloud
Copy link
Contributor

@jtpio I want to join your work, should I continue contributing to the jupyterlab-rspack project?

xc2 and jtpio reacted with heart emoji

@jtpio
Copy link
MemberAuthor

Thanks@FoSuCloud!

https://github.com/jtpio/jupyterlab-rspack might be lagging a bit behind now. Maybe we could work on this PR directly instead? If you are able to open PRs against this branch I would be happy to merge your contributions.

There are still a few items listed in the top comment that we should check / re-enable, that can serve as a good starting point for continuing this work.

Thank you again for offering your help!

@jtpio
Copy link
MemberAuthor

Hi@jtpio , how to migrate custom widget library with custom webpack.config.js?

@erkin98 for now this is not ready yet. But hopefully the customwebpack.config.js should still be compatible with Rspack (or we should make it possible to use the same config). Would you be able to share the config here or in#15035?

@jtpio
Copy link
MemberAuthor

Looks like updating to theRspack 0.6.1 release introduces the following error in the dev tools console:

image

@xc2
Copy link

xc2 commentedApr 16, 2024
edited
Loading

Looks like updating to theRspack 0.6.1 release introduces the following error in the dev tools console:

image

web-infra-dev/rspack#6230 this might be the same cause. Could you please try out the nightly version?


image

seems not help


image

the current nightly version0.6.1-canary-73a9832-20240414004901 should help

@jtpio
Copy link
MemberAuthor

Thanks@xc2 for chiming in!

Also updating to the latest0.6.2 seems to be giving this issue:

../node_modules/@rspack/binding/binding.d.ts:36:47 - error TS2552: Cannot find name 'PathData'. Did you mean 'JsPathData'?36   getAssetPath(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): string                                                 ~~~~~~~~../node_modules/@rspack/binding/binding.d.ts:37:55 - error TS2552: Cannot find name 'PathData'. Did you mean 'JsPathData'?37   getAssetPathWithInfo(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): PathWithInfo                                                         ~~~~~~~~

@xc2
Copy link

xc2 commentedApr 17, 2024

Thanks@xc2 for chiming in!

Also updating to the latest0.6.2 seems to be giving this issue:

../node_modules/@rspack/binding/binding.d.ts:36:47 - error TS2552: Cannot find name 'PathData'. Did you mean 'JsPathData'?36   getAssetPath(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): string                                                 ~~~~~~~~../node_modules/@rspack/binding/binding.d.ts:37:55 - error TS2552: Cannot find name 'PathData'. Did you mean 'JsPathData'?37   getAssetPathWithInfo(filename: string | ((pathData: PathData, assetInfo?: JsAssetInfo) => string), data: JsPathData): PathWithInfo                                                         ~~~~~~~~

Thanks!

@ahabhgk fixes it inweb-infra-dev/rspack#6265

please try 0.6.2-canary-4b8f4a6-20240417094517

@jasongrout
Copy link
Contributor

Fix Mathjax warnings:

I'm not seeing mathjax warnings in the current PR tests and when I manually dojlpm run build, so I'll mark this as done.@jtpio - if you see those mathjax warnings, let me know.

Claude Code (after a few restarts with guidance) found the issue and explained:The issue was that the watch script on line 17 of dev_mode/package.json was running rspack --watch without specifying the config file. When rspack runs without a config, it tries to use default conventions and looks for ./src/index.js as the entry point, which doesn't exist in your setup. I've updated the watch script to:"watch": "rspack --watch --config webpack.config.js"This matches the pattern used by the build script on line 7 and ensures rspack uses the correct configuration with the proper entry points defined in webpack.config.js.
@jasongrout
Copy link
Contributor

Fixed and testedjupyter lab --dev-mode --watch - the dev-mode watch was not getting the right config file.

@jasongrout
Copy link
Contributor

licenses seems to work:jlpm build:dev:prod generates a reasonable-lookingdev_mode/static/third-party-licenses.json

@jasongrout
Copy link
Contributor

jasongrout commentedDec 3, 2025
edited
Loading

Watch workflows we are targeting:

  1. jupyter lab --dev-mode --watch should pick up changes in core packages
  2. jlpm run watch in a prebuilt extension installed withlabextension develop rebuilds and serves the new prebuilt extension, reflecting changes after a frontend refresh

I think what we'll be missing islabextension link, which lets us install/watch asource extension - but those are deprecated at this point.

For reference a lot of the watching stuff was last touched in#6700

@jasongroutjasongrout marked this pull request as ready for reviewDecember 4, 2025 17:45
@jasongrout
Copy link
Contributor

@jtpio - ready for review.

@krassowski,@jtpio - what do you think about merging this now and making a quick alpha of 4.6 so we can start getting feedback on how the build system works for the staging directory?

krassowski and jtpio reacted with thumbs up emoji

@jtpio
Copy link
MemberAuthor

Oh wow, thanks@jasongrout for working on this and having all the checks finally pass!

Agreed that it would be better to merge this early in an alpha release, to have the full release cycle to better test it 👍

@jtpio
Copy link
MemberAuthor

Let's add a note about this in theextension migration guide, for visibility?

@jasongrout
Copy link
Contributor

Let's add a note about this in theextension migration guide, for visibility?

Done!

@jtpio
Copy link
MemberAuthor

Seeing a ~5x build speedup on CI, although the total check run is quite similar:

Webpack -main (c3a51ae)

image

Rspack - this PR (22a0385)

image
jasongrout and chenjiahan reacted with rocket emoji

@jasongrout
Copy link
Contributor

Resolved the merge conflict in the release notes file.

@jtpio
Copy link
MemberAuthor

Thanks@jasongrout for helping with this PR!

I checked the last commits and they look good. As discussed yesterday during the meeting (jupyterlab/frontends-team-compass#279 (comment)), it would be great to move forward with this so we have the full 4.6 release cycle to put this under more testing and fix potential issues.

@jasongrout
Copy link
Contributor

Jeremy, I'm taking your comment as a postive review on the parts I've done, and I'm positively reviewing the parts you've done, so I think we've satisfied the review requirement. We also discussed this in the dev meeting yesterday with a positive result. So I think we're good to merge!

jtpio and chenjiahan reacted with hooray emoji

@jasongroutjasongrout merged commit19ccacf intojupyterlab:mainDec 11, 2025
88 of 90 checks passed
@jtpiojtpio deleted the rspack branchDecember 11, 2025 19:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@krassowskikrassowskiAwaiting requested review from krassowski

Assignees

@jtpiojtpio

Projects

Status: Done

Milestone

4.6.0

Development

Successfully merging this pull request may close these issues.

7 participants

@jtpio@erkin98@FoSuCloud@xc2@chenjiahan@krassowski@jasongrout

[8]ページ先頭

©2009-2025 Movatter.jp