pro-components
pro-components copied to clipboard
🐛[BUG] 循环依赖问题
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
使用 vite 打包时产生零循环依赖警告, 警告信息如下:
Export "ProForm" of module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-form/es/layouts/ProForm/index.js" was reexported through module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/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/pages/Task/TaskInfo/components/components/TaskForward.tsx" 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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-form/es/layouts/ProForm/index.js" was reexported through module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/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.
Export "useEditableArray" of module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-utils/es/useEditableArray/index.js" was reexported through module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-utils/es/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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-table/es/Table.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "recordKeyToString" of module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-utils/es/useEditableArray/index.js" was reexported through module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-utils/es/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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-table/es/Table.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "editableRowByKey" of module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-utils/es/useEditableArray/index.js" was reexported through module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-utils/es/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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-table/es/Table.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
Export "default" of module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-form/es/components/FormItem/index.js" was reexported through module "node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-form/es/components/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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@ant-design/pro-form/es/layouts/ProForm/index.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.6.11
- umi 版本 无
- 浏览器环境 chrome 115
- 开发环境 [e.g. mac OS] archlinux
🚑 其他信息
vite: 4.4.6 antd: 5.8.2 react-dom: 18.2.0
- ProComponents:2.6.43
can anybody resolve it ? @fnoopv @andriijas @sorrycc @craxyz @thierryxing
+1, Vite5和所有 antd 依赖是最新的情况下, 依然有这个问题
me too ! version:
- ProComponents:2.6.43
can anybody resolve it ? @fnoopv @andriijas @sorrycc @craxyz @thierryxing
no
I have not used this for many years.