ant-design / ant-design/pro-components
🐛[BUG] vite6.3.5构建项目,ProForm 循环依赖
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🐛 bug 描述
vite6.3.5构建项目,ProForm 循环依赖 警告如下
```
> vite build
vite v6.3.5 building for production...
transforming...
✓ 11046 modules transformed.
Export "ProForm" of module "node_modules/@ant-design/pro-form/es/layouts/ProForm/index.js" was reexported through module "node_modules/@ant-design/pro-form/es/layouts/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "src/views/instrument-equipment/maintaining/maintenance-log-add.jsx" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "ProForm" of module "node_modules/@ant-design/pro-form/es/layouts/ProForm/index.js" was reexported through module "node_modules/@ant-design/pro-form/es/layouts/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "node_modules/@ant-design/pro-table/es/utils/cellRenderToFromItem.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
```
### 📷 复现步骤
使用 ProForm 组件
### 🏞 期望结果
没有此警告
### 💻 复现代码
### © 版本信息
- ProComponents 版本: 2.8.10
- 开发环境: win
- vite 6.3.5
### 🚑 其他信息
Contributor guide
Research direction
Start by reproducing `vite build` with the ProForm usage described in the issue and inspect the warning involving `src/views/instrument-equipment/maintaining/maintenance-log-add.jsx`. Compare the re-exports in `node_modules/@ant-design/pro-form/es/layouts/ProForm/index.js` and `layouts/index.js`, plus `pro-table/es/utils/cellRenderToFromItem.js`; done means the build no longer reports the circular chunk warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, vite
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100