fix(pack): napi types for module.rules - #2470
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! 此拉取请求主要更新了 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
4f6eb1e to
fac692c
Compare
There was a problem hiding this comment.
Code Review
这个 PR 更新了 Turbopack module.rules 的 TypeScript 类型定义,以支持更高级的加载器条件,这与 Next.js 的文档保持了一致。这是一个很好的改进,使得类型更加精确和强大。
我发现 packages/pack-shared/src/config.ts 中的类型定义可能不完整。根据 Rust 核心代码,module.rules 的值除了支持对象形式外,还支持加载器数组的快捷方式。当前的类型似乎遗漏了对这种快捷方式的支持。我在具体的审查评论中提出了修改建议,以使类型定义与后端实现完全匹配。
b9546b3 to
3a0c9c9
Compare
Summary
适配: https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack#advanced-webpack-loader-conditions
修复:
Test Plan