Skip to content

Conversation

@LingyuCoder
Copy link
Contributor

@LingyuCoder LingyuCoder commented Dec 9, 2025

Summary

This PR adds test, include, and exclude options to EvalSourceMapDevToolPlugin, 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

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

Copilot AI review requested due to automatic review settings December 9, 2025 07:53
@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit ebaead4
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6937d57152156c0008bc7420

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

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 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_object method that applies the filter conditions in the correct order
  • Added filtering logic in render_module_content to 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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Rsdoctor Bundle Diff Analysis

Found 5 project(s) in monorepo.

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

📌 Baseline Commit: b0beb31108 | PR: #12389

Metric Current Baseline Change
📊 Total Size 5.7 MB 5.7 MB 0 B (0.0%)
📄 JavaScript 5.7 MB 5.7 MB 0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-10k Bundle Diff

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

📌 Baseline Commit: b0beb31108 | PR: #12389

Metric Current Baseline Change
📊 Total Size 823.6 KB 823.6 KB 0 B (0.0%)
📄 JavaScript 823.6 KB 823.6 KB 0 B (0.0%)
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-1k Bundle Diff

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

📌 Baseline Commit: b0beb31108 | PR: #12389

Metric Current Baseline Change
📊 Total Size 2.7 MB 2.7 MB 0 B (0.0%)
📄 JavaScript 2.7 MB 2.7 MB 0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: react-5k Bundle Diff

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

📌 Baseline Commit: b0beb31108 | PR: #12389

Metric Current Baseline Change
📊 Total Size 984.3 KB 984.3 KB 0 B (0.0%)
📄 JavaScript 984.3 KB 984.3 KB 0 B (0.0%)
🎨 CSS 0 B 0 B N/A
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: rome Bundle Diff

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

📌 Baseline Commit: b0beb31108 | PR: #12389

Metric Current Baseline Change
📊 Total Size 2.1 MB 2.1 MB 0 B (0.0%)
📄 JavaScript 2.0 MB 2.0 MB 0 B (0.0%)
🎨 CSS 83.0 KB 83.0 KB 0 B (0.0%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 0 B 0 B N/A

📦 Download Diff Report: ui-components Bundle Diff

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

📦 Binary Size-limit

Comparing ebaead4 to feat: support dynamic URL with new URL() context mode (#12389) by harpsealjs

❌ Size increased by 1.00KB from 47.72MB to 47.72MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 9, 2025

CodSpeed Performance Report

Merging #12392 will not alter performance

Comparing fix/eval-source-map-devtool-plugin-filters (ebaead4) with main (b0beb31)

Summary

✅ 17 untouched

@LingyuCoder LingyuCoder requested a review from SyMind December 9, 2025 08:21
@LingyuCoder LingyuCoder enabled auto-merge (squash) December 9, 2025 08:43
@LingyuCoder LingyuCoder merged commit f375692 into main Dec 9, 2025
87 of 89 checks passed
@LingyuCoder LingyuCoder deleted the fix/eval-source-map-devtool-plugin-filters branch December 9, 2025 08:54
@CPunisher CPunisher mentioned this pull request Dec 17, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug 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.

3 participants