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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom webpack config for federated extensions #9224
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
See #9175 for more context. And jtpio/jupyterlab-wasm-example#4 as an example for what it would look like from a third-party extension. |
|
||
// Use the custom webpack config only if the path to the config | ||
// is specified in package.json (opt-in) | ||
if (webpackConfigPath) { |
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 makes it opt-in, meaning that even if a webpack.config.js
file is at the root of the federated extension folder, it will not be picked up unless explicitly specified in package.json
under the jupyterlab.webpackConfig
subkey.
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.
Thanks. I think that is really important to be explicit about this, especially given it is an experimental feature. We only want it available to people that really explicitly want to use it.
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.
LGTM, thanks!
Thanks! |
References
Fixes #9175
Should also cover the use case mentioned in #4328
Code changes
Allow extension authors to provide a custom webpack config for their federated extension.
TODO
User-facing changes
None
Backwards-incompatible changes
None user facing.
For developers, this exposes a direct way to configure webpack for federated extensions.