-
-
Notifications
You must be signed in to change notification settings - Fork 757
fix: add test/include/exclude options to EvalSourceMapDevToolPlugin #12392
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 canceled.
|
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 test, include, and exclude filtering options to EvalSourceMapDevToolPlugin, enabling users to filter which modules should generate source maps based on their resource paths. This brings the plugin's functionality in line with webpack's EvalSourceMapDevToolPlugin.
Key changes:
- Added three new optional fields (
test,include,exclude) to the plugin struct for module filtering - Implemented a
match_objectmethod that applies the filter conditions in the correct order - Added filtering logic in
render_module_contentto skip modules that don't match the criteria - Enabled the previously-disabled test case by removing the test filter file
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs |
Added test/include/exclude fields to plugin struct, implemented match_object method for filtering, and integrated filtering logic into render_module_content to skip non-matching modules |
tests/rspack-test/configCases/source-map/exclude-modules-source-map/test.filter.js |
Removed TODO test filter file to enable the test now that the feature is implemented |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 1.00KB from 47.72MB to 47.72MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12392 will not alter performanceComparing Summary
|
Summary
This PR adds
test,include, andexcludeoptions toEvalSourceMapDevToolPlugin, allowing users to filter modules for which source maps should be generated based on module paths.This feature aligns the plugin behavior with webpack's EvalSourceMapDevToolPlugin.
Related links
Checklist