Skip to content

Conversation

@fireairforce
Copy link

把 css 里面的 url resolve 按照 optional 的 resolve 去处理:

https://github.com/utooland/next.js/blob/utoo/turbopack/crates/turbopack-core/src/resolve/mod.rs#L3390-L3392

这样 resolve 解析不到时,当作 warning 处理而不是 error 处理,这对很多存量业务 case 会很友好。

@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!

此拉取请求旨在通过将 CSS URL 解析失败从硬错误降级为警告来增强 Turbopack 对现有项目的兼容性。这一更改通过将解析标记为“可选”来实现,确保即使某些资源无法解析,构建过程也能继续,同时仍能通知开发者潜在的问题。

Highlights

  • CSS URL 解析行为变更: 将 CSS 中 URL 的解析行为从强制解析改为可选解析。
  • 错误处理优化: 未能解析的 CSS URL 现在将作为警告而非错误处理,从而提高对现有项目的兼容性。
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

此拉取请求将 CSS 中无法解析的 url() 引用从构建错误更改为警告。这是通过将资源解析标记为可选来实现的。虽然这对于处理包含无效 URL 的存量业务很有帮助,但这也可能导致在新项目中意外地忽略了损坏的资源路径。我添加了一条评论,建议将此行为设为可配置,以提供更大的灵活性。

@xusd320 xusd320 merged commit 72671ec into utoo Jan 22, 2026
11 of 21 checks passed
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