fix(turbopack): remove loader require.resolve paths params#72
Conversation
Summary of ChangesHello @fireairforce, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此次 PR 旨在修复 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
此 PR 旨在调整 Turbopack 解析 webpack loader 的方式,使其从 @utoo/pack 包内部开始查找,而非从当前项目目录。实现方式是移除了 require.resolve 调用中的 paths 参数。
我的审查发现,此改动虽然符合 PR 描述的意图,但可能会引入一个破坏性变更,即不再支持使用相对路径来指定 loader。这可能会影响到现有的项目配置。因此,我在评论中指出了这个问题,并建议作者明确这是一个破坏性变更(例如通过修改 commit message),或者考虑采用保持向后兼容性的实现方式。
适配 PR: utooland/utoo#2299
因为
.turbopack被移到@utoo/pack下面去了,loader 应该从@utoo/pack那层开始找,而不是从项目的 cwd 找。本地测试: