-
-
Notifications
You must be signed in to change notification settings - Fork 724
feat(browser): support modules
in BrowserRequirePlugin
#11822
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
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Pull Request Overview
This PR adds a new modules
option to the BrowserRequirePlugin
to support direct module mapping, making it more convenient to use custom loaders in the Rspack browser environment.
Key changes:
- Adds a
modules
option that allows direct mapping from module specifiers to JavaScript objects - Makes the
execute
option optional whenmodules
is provided - Updates documentation to explain both usage patterns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
packages/rspack/src/browser/BrowserRequirePlugin.ts | Implements the modules option with module mapping logic and fallback behavior |
packages/rspack/src/browser/index.ts | Fixes export path for BrowserRequirePlugin |
website/docs/en/api/javascript-api/browser.mdx | Adds English documentation for the new modules option |
website/docs/zh/api/javascript-api/browser.mdx | Adds Chinese documentation for the new modules option |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
📦 Binary Size-limit
🎉 Size decreased by 384bytes from 47.89MB to 47.89MB (⬇️0.00%) |
CodSpeed Performance ReportMerging #11822 will not alter performanceComparing Summary
|
Summary
This option makes it more convenient to use custom loaders in rspack browser
Checklist