Skip to content

Conversation

@SudoUserReal
Copy link
Collaborator

关联 Issue: #3116@douyinfe/semi-webpack-plugin 正则未匹配 @douyinfe/semi-ui-19

问题概述

现有规则/正则仅匹配 @douyinfe/semi-(ui|icons|foundation) 的固定包名形态,导致当依赖包名为 @douyinfe/semi-ui-19(或类似带数字后缀)时无法命中,从而插件对应 loader/rule 不生效。

解决方案

将 Semi 相关依赖的识别正则扩展为“可选数字后缀”形式(例如 semi-ui(-19)?),确保 @douyinfe/semi-ui@douyinfe/semi-ui-19 均能被正确匹配,同时保持对 semi-iconssemi-foundation 的兼容。

主要变更点

  • packages/semi-webpack/src/semi-webpack-plugin.ts:更新并复用匹配正则,支持 @douyinfe/semi-ui-19 等形态
  • packages/semi-webpack/README.md:补充说明支持带数字后缀的 Semi 包名
  • packages/semi-rspack/src/rule.ts:同步修复 rspack 侧的匹配规则,保持行为一致
  • packages/semi-rspack/README.md:同步更新文档说明

测试说明

  • 本次未新增自动化测试用例;通过典型依赖路径(@douyinfe/semi-ui / @douyinfe/semi-ui-19)进行匹配逻辑手工校验,确保规则可命中并不影响原有包名匹配。

This commit was automatically generated by Semi Issue Solver.
Closes #3116
@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 2, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 72ccff0:

Sandbox Source
pr-story Configuration

@cypress
Copy link

cypress bot commented Feb 2, 2026

semi-design    Run #3447

Run Properties:  status check passed Passed #3447  •  git commit 17f518df92 ℹ️: Merge 72ccff08a5f04cb85e3e1312f92e7720b6096844 into d56dc3df4f84819caa7e98a49e9d...
Project semi-design
Branch Review solve/issue-3116-1770017038039
Run status status check passed Passed #3447
Run duration 08m 00s
Commit git commit 17f518df92 ℹ️: Merge 72ccff08a5f04cb85e3e1312f92e7720b6096844 into d56dc3df4f84819caa7e98a49e9d...
Committer SudoUser
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 13
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 291
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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