`restrictions`: resolution of packages that have `exports` fields does not fall back correctly
还没有人认领这个 Issue。
评估
调研方向
Start with the enhanced-resolve PR #600 and the linked repro commit, then trace rspack-resolver's restrictions handling for packages with exports and multiple modules entries. Add a regression test for the fallback scenario and verify that resolution proceeds to a later modules entry when the first result violates the restriction.
由索引模型根据 Issue 内容生成。
描述
rspack-resolver seems to have the same bug in restrictions handling that enhanced-resolve fixed here: https://github.com/webpack/enhanced-resolve/pull/600. (An error is returned when attempting to resolve a package that has an exports field defined, instead of falling back to resolve from a subsequent entry in modules configuration.)
The case is the one described here: https://github.com/orgs/webpack/discussions/21080, where "modules" is configured as an array of two or more entries, and "restrictions" is defined in a way that means the first "modules" entry will produce a resolution that does not meet the restriction.
I do not know Rust, so ignore this is if it's not a helpful illustration, but here is a Claude-generated repro (porting the new test cases enhanced-resolve introduced for this issue, and highlighting the scenario that fails): https://github.com/bregenspan/rspack-resolver/commit/abaf51a5eeeca1c5ff029fbd270a6b632c959567
- 主要语言
- Rust
- 星标
- 42
- 派生
- 10
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rstackjs/rspack-resolver 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 84/100
rstackjs/rspack-resolver#280 ·
-
fuzz-crash
难度 4/5 3-5 天 新手友好度 35/100
rstackjs/rspack-resolver#287 ·
-
难度 3/5 1-2 天 新手友好度 76/100
rstackjs/rspack-resolver#239 ·
-
难度 5/5 一周以上 新手友好度 15/100
rstackjs/rspack-resolver#96 ·
查看 rstackjs/rspack-resolver 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copied未关闭unconfirmed possible issue
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
jerney-nexus/epikrise#364 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
Yeachan-Heo/gajae-code#8058 ·
维护者通常 1 天内回复