Visitar URL original
fix(AliasPlugin): correct wildcard replacement in multi-target aliases by xiaoxiaojx · Pull Request #465 · webpack/enhanced-resolve · GitHub
Skip to content

fix(AliasPlugin): correct wildcard replacement in multi-target aliases - #465

Merged
alexander-akait merged 2 commits into
mainfrom
fix/alias
Sep 26, 2025
Merged

alexander-akait merged 2 commits into
mainfrom
fix/alias

Conversation

@xiaoxiaojx

@xiaoxiaojx xiaoxiaojx commented Sep 26, 2025 •

Copy link
Copy Markdown
Member

When processing multi-target wildcard aliases like:
The current code uses item.alias (the entire array) instead of alias (current item being processed).
Result:

item.alias.toString() → "/src/utils/*,/src/components/*".replace("*", "button") → "/src/utils/button,/src/components/*" ❌

Expected:

alias.toString() → "/src/utils/*".replace("*", "button") → "/src/utils/button" ✅

@codecov

codecov Bot commented Sep 26, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.13%. Comparing base (f1bc1c2) to head (4abeddb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #465   +/-   ##
=======================================
  Coverage   93.13%   93.13%           
=======================================
  Files          45       45           
  Lines        2155     2155           
  Branches      654      654           
=======================================
  Hits         2007     2007           
  Misses        119      119           
  Partials       29       29           
Flag Coverage Δ
integration 93.13% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
alexander-akait merged commit 79e2961 into main Sep 26, 2025
@alexander-akait
alexander-akait deleted the fix/alias branch September 26, 2025 12:18
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