Skip to content

fix(ava): fix build problem - #848

Merged
hustcc merged 2 commits into
v4from
fix-build
Nov 6, 2025
Merged

fix(ava): fix build problem#848
hustcc merged 2 commits into
v4from
fix-build

Conversation

@leondt1

@leondt1 leondt1 commented Nov 6, 2025

Copy link
Copy Markdown

PR includes

  • 修复构建问题。
  • @antv/mcp-server-chart 依赖 node 环境,执行 build:umd 时, father build 应该默认不会处理 node 相关内容,导致报错,添加一些 plugin 去处理

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @leondt1, 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!

此拉取请求旨在解决项目在进行 UMD 构建时遇到的失败问题。核心原因是某个关键依赖项在浏览器环境中无法正确解析 Node.js 特定的模块和全局变量。通过引入 Webpack 配置和必要的 polyfill,确保了构建过程能够顺利完成,从而使项目能够成功打包为 UMD 格式,兼容浏览器环境。

Highlights

  • 构建问题修复: 解决了 @antv/mcp-server-chart/sdk 依赖 Node.js 环境导致 UMD 构建失败的问题。
  • Webpack 配置更新: 在 .fatherrc.ts 中通过 chainWebpack 添加了 Webpack 插件和配置,以处理 Node.js 模块在浏览器环境中的兼容性,包括为 node:process 设置别名、为 process 设置 fallback 以及重写 node: 方案的导入。
  • 依赖更新: 在 package.json 中新增了 process 依赖,用于提供 Node.js process 模块的浏览器 polyfill。
  • 类型定义调整: 从 src/types/index.ts 中移除了对 ckb 类型的导出。
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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

这个 PR 旨在修复 UMD 构建过程中因 @antv/mcp-server-chart 依赖 Node.js 环境而导致的问题。通过在 .fatherrc.ts 中使用 chainWebpack 添加 Node.js 的 polyfill(特别是 process),并调整 package.json 和类型导出,成功解决了构建失败。整体改动方向正确,有效解决了问题。我提出了一些小建议以提高代码质量和健壮性。

Comment thread .fatherrc.ts
Comment thread package.json
@leondt1 leondt1 changed the title Fix build fix(ava): fix build problem Nov 6, 2025
@leondt1
leondt1 requested review from Yzing and hustcc November 6, 2025 07:12
@hustcc
hustcc merged commit 379c478 into v4 Nov 6, 2025
0 of 2 checks passed
@hustcc
hustcc deleted the fix-build branch November 6, 2025 09:11
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.

2 participants