Skip to content

Conversation

@SudoUserReal
Copy link
Collaborator

关联 Issue: #3116

问题概述

@douyinfe/semi-webpack-plugin(以及对应的 semi-rspack 规则)在判断 module.resource 路径时,包名匹配正则仅覆盖 @douyinfe/semi-ui/semi-icons/semi-foundation,未包含 @douyinfe/semi-ui-19 这类“带数字后缀”的包名,导致相关 loader/rule 不生效。

解决方案

将 Semi 相关依赖的包名匹配逻辑扩展为支持可选的 -数字 后缀(例如 -19),并保持原有包名/路径匹配边界,避免误匹配。

主要变更点

  • 更新 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:同步补充文档说明。

测试说明

  • 未新增自动化测试(该包当前缺少就绪的测试基础设施)。
  • 通过对典型 module.resource 路径用例进行人工校验,确认 @douyinfe/semi-ui-19/lib/... 能命中对应规则且不影响原有 @douyinfe/semi-ui/lib/... 等匹配路径。

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 #3448

Run Properties:  status check passed Passed #3448  •  git commit 6989b5d330 ℹ️: Merge 72ccff08a5f04cb85e3e1312f92e7720b6096844 into d56dc3df4f84819caa7e98a49e9d...
Project semi-design
Branch Review solve/issue-3116-1770017038039
Run status status check passed Passed #3448
Run duration 08m 14s
Commit git commit 6989b5d330 ℹ️: 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