Skip to content

Conversation

@fireairforce
Copy link

@fireairforce fireairforce commented Nov 10, 2025

适配 PR: utooland/utoo#2299

因为 .turbopack 被移到 @utoo/pack 下面去了,loader 应该从 @utoo/pack 那层开始找,而不是从项目的 cwd 找。

本地测试:

截屏2025-11-10 16 08 59

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 旨在修复 turbopack 中 loader 模块的解析问题。由于 .turbopack 目录已迁移至 @utoo/pack,原有的 require.resolve 路径参数导致 loader 无法正确查找。通过移除这些显式路径参数,系统将能根据新的模块结构正确解析 loader,确保功能正常运行。

Highlights

  • 修复 loader 路径解析: 移除了 __turbopack_external_require__.resolve 中的 paths 参数,以解决 .turbopack 模块迁移到 @utoo/pack 后 loader 无法正确解析的问题。
  • 移除冗余变量: 删除了不再使用的 resourceDir 变量,因为它与 paths 参数的移除直接相关。
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

此 PR 旨在调整 Turbopack 解析 webpack loader 的方式,使其从 @utoo/pack 包内部开始查找,而非从当前项目目录。实现方式是移除了 require.resolve 调用中的 paths 参数。

我的审查发现,此改动虽然符合 PR 描述的意图,但可能会引入一个破坏性变更,即不再支持使用相对路径来指定 loader。这可能会影响到现有的项目配置。因此,我在评论中指出了这个问题,并建议作者明确这是一个破坏性变更(例如通过修改 commit message),或者考虑采用保持向后兼容性的实现方式。

@xusd320 xusd320 merged commit be61779 into utoo Nov 10, 2025
14 of 27 checks passed
@xusd320 xusd320 deleted the remove-loader-path branch November 26, 2025 02:23
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.

3 participants