Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.8k
Fix: Proper Detection of ES Modules in Federated Extension Loader#18154
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for making a pull request to jupyterlab! |
prajyot-porje commentedNov 26, 2025
Hi@krassowski, could you please add the appropriate label to this PR? The "Enforce PR label" check is failing, and as an external contributor I don’t have permission to apply labels myself. Once a label is added, the workflow should pass. Thanks again for your guidance on this issue! |
Darshan808 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Left some suggestions focused on reducing verbosity.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Darshan Poudel <pranishpoudel10@gmail.com>
Darshan808 commentedNov 30, 2025
Lint job is still failing. |
prajyot-porje commentedNov 30, 2025
Lint issues have been fixed manually using |
Darshan808 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This looks good at a glance. I wasn’t able to test it on a federated extension using ES modules, though. Maybe@krassowski or@kkoster can help verify that part.
Fix: Proper Detection of ES Modules in Federated Extension Loader
🔧 Problem
The federated extension loader does not reliably detect when an extension is using ES modules.
Even when extensions output valid ESM bundles, the loader defaults to treating them as CommonJS,
which can cause load failures depending on how the extension was built.
✅ What This PR Does
This PR updates
dev_mode/bootstrap.jsto improve ES module detection in federated extensions.Key Improvements
.mjsfile extension.federated_extensions) foresModule: true.📁 Files Changed
dev_mode/bootstrap.js🧪 Testing
I could not reproduce the module-format error locally, but the logic follows the expected behavior
and aligns with the discussion in the linked issue. Feedback from maintainers on validation
with real-world extension setups is appreciated.
📌 Related Issue
Fixes#17809