Reproduction link
Steps to reproduce
- use a in a new app
- use a bundle analyser like @next/bundle-analyzer or webpack-bundle-analyzer
What is expected?
The rc-field-form package should not exist in the bundle when using just a
What is actually happening?
The rc-field-form package exists in the bundle when using just a
| Environment | Info |
| ------------ | ------------ |
| antd | 5.12.2 |
| React | 18.2.0 |
| System | * |
| Browser | * |
I believe is line line imports the entire forms component:
ant-design/components/modal/Modal.tsx
Line 12 in 45b8072
| | import{NoFormStyle}from'../form/context'; |
4条答案
按热度按时间0lvr5msh1#
ref: #46574
kyvafyod2#
v4 or v5? Could you provide a repo to reproduce?
iovurdzv3#
Hello @IonelLupu. Please provide a online reproduction by forking codesandbox of antd@5.x or antd@4.x , or provide a minimal GitHub repository. Issues labeled by
Need Reproduce
will be closed if no activities in 3 days.你好 @IonelLupu,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 antd@5.x 或 antd@4.x 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。
什么是最小化重现,为什么这是必需的?
mrphzbgm4#
@MadCcc v5.
Just use the demo in the sandbox, use a bundle analysed, build the project to get the bundle info. You will notice the form package when using only a simple modal
Also, check the referred issue by @yoyo837. The issue looks the same. But my issue is when using a modal in V5