Skip to content

feat: support function matcher in rule options#19952

Merged
alexander-akait merged 3 commits intomainfrom
func-match
Sep 29, 2025
Merged

feat: support function matcher in rule options#19952
alexander-akait merged 3 commits intomainfrom
func-match

Conversation

@hai-x
Copy link
Member

@hai-x hai-x commented Sep 27, 2025

Summary

What kind of change does this PR introduce?

  • Add support for function matchers in certain plugin options.
  • Reorder type guards so that RegExp is checked first (since it’s often the default).

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

If relevant, what needs to be documented once your changes are merged or what have you already documented?

https://webpack.js.org/plugins/eval-source-map-dev-tool-plugin/#options
https://webpack.js.org/plugins/source-map-dev-tool-plugin/#options
https://webpack.js.org/plugins/banner-plugin/#options

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 27, 2025

CodSpeed Performance Report

Merging #19952 will degrade performances by 41.37%

Comparing func-match (13c03f8) with main (8c0fa9e)

Summary

⚡ 2 improvements
❌ 1 regression
✅ 39 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "devtool-eval", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 44.5 ms 75.8 ms -41.37%
benchmark "devtool-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 116.2 ms 72 ms +61.5%
benchmark "many-chunks-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 182.3 ms 140.2 ms +30.04%

@alexander-akait alexander-akait merged commit 761b153 into main Sep 29, 2025
44 checks passed
@alexander-akait alexander-akait deleted the func-match branch September 29, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants