Skip to content

Conversation

CPunisher
Copy link
Contributor

Summary

This option makes it more convenient to use custom loaders in rspack browser

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@CPunisher CPunisher requested a review from hardfist as a code owner October 9, 2025 07:27
@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 07:27
Copy link

netlify bot commented Oct 9, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit b87a194
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68e8b7af2641120008b8891d
😎 Deploy Preview https://deploy-preview-11822--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature release: feature related release(mr only) labels Oct 9, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 when modules 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.

Copy link
Contributor

github-actions bot commented Oct 9, 2025

📦 Binary Size-limit

Comparing b87a194 to test: run webpack hot cases with test tools (#11826) by harpsealjs

🎉 Size decreased by 384bytes from 47.89MB to 47.89MB (⬇️0.00%)

Copy link

codspeed-hq bot commented Oct 9, 2025

CodSpeed Performance Report

Merging #11822 will not alter performance

Comparing 10-09-feat/browser-loader (b87a194) with main (1b072f0)

Summary

✅ 17 untouched

@CPunisher CPunisher enabled auto-merge (squash) October 10, 2025 07:39
@CPunisher CPunisher merged commit c224a30 into main Oct 10, 2025
44 checks passed
@CPunisher CPunisher deleted the 10-09-feat/browser-loader branch October 10, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants