Summary
We are using @ant-design/pro-components@^2.7.0 in our React 19 + Vite project. After auditing our package-lock.json, we found two transitive dependency issues that cause unnecessary bundle weight and potential React 19 compatibility warnings.
Issue 1 β lodash + lodash-es duplicate (two versions)
Running npm ls lodash and npm ls lodash-es shows two versions of each:
| Package |
Version |
Source |
lodash |
4.18.1 |
@ant-design/pro-components β @ant-design/pro-field, @ant-design/pro-form, @ant-design/pro-layout, @ant-design/pro-table, @ant-design/pro-utils |
lodash |
4.17.23 |
@refinedev/core β same @ant-design/pro-layout sub-package |
lodash-es |
4.18.1 |
Same pro-components sub-packages |
lodash-es |
4.17.23 |
@refinedev/antd β @ant-design/pro-layout |
@ant-design/pro-components sub-packages depend on both lodash (CJS) and lodash-es (ESM), and two minor versions of each end up in the tree. This means Rollup/Vite cannot deduplicate them, adding ~140 KB to the bundle unnecessarily.
Request: migrate all @ant-design/pro-* sub-packages to use lodash-es exclusively (as the ESM project standard), removing the lodash CJS dependency. This would also reduce tree-shaking friction.
Issue 2 β react-is@16 transitive with React 19
@ant-design/pro-components
βββ¬ @ant-design/pro-list
βββ¬ rc-util@4.21.1
βββ react-is@16.13.1
react-is@16.13.1 (from rc-util@4.21.1) coexists with React 19 in our project. While this is not always a hard break, React 19 deprecated several lifecycle methods that react-lifecycles-compat and react-is@16 rely on. This can trigger runtime warnings and is flagged by React 19's strict mode.
Request: bump rc-util to a version that depends on react-is@17 or later (which @ant-design/icons already does via rc-util@5.44.4 β react-is@18.3.1).
Evidence
From package-lock.json in our project (Donna, a React 19 internal tool):
# npm ls lodash (excerpt)
βββ¬ @ant-design/pro-components@2.8.10
βββ¬ @ant-design/pro-field@3.1.0
β βββ lodash@4.18.1
βββ¬ @ant-design/pro-utils@2.18.0
βββ lodash@4.17.23 (via @refinedev/core sub-tree)
# npm ls react-is (excerpt)
βββ¬ @ant-design/pro-components@2.8.10
βββ¬ @ant-design/pro-list@2.6.10
βββ¬ rc-util@4.21.1
βββ react-is@16.13.1 β old
Questions
- Is there a plan to migrate
@ant-design/pro-* to lodash-es-only? (This is a known issue in the React ecosystem with ant-design packages.)
- Is
rc-util planned to be bumped to 5.x in @ant-design/pro-list to get react-is@18?
- If upstream cannot address these soon, we will evaluate
patch-package as a local workaround β would you accept a PR for the lodash migration?
Thank you for maintaining this excellent library.
Reported from project Donna (internal tool). lodash audit: 2 versions Γ 2 variants (CJS+ESM) = ~140 KB extra bundle. react-is: strict mode warnings on React 19.
Summary
We are using
@ant-design/pro-components@^2.7.0in our React 19 + Vite project. After auditing ourpackage-lock.json, we found two transitive dependency issues that cause unnecessary bundle weight and potential React 19 compatibility warnings.Issue 1 β lodash + lodash-es duplicate (two versions)
Running
npm ls lodashandnpm ls lodash-esshows two versions of each:lodash4.18.1@ant-design/pro-componentsβ@ant-design/pro-field,@ant-design/pro-form,@ant-design/pro-layout,@ant-design/pro-table,@ant-design/pro-utilslodash4.17.23@refinedev/coreβ same@ant-design/pro-layoutsub-packagelodash-es4.18.1lodash-es4.17.23@refinedev/antdβ@ant-design/pro-layout@ant-design/pro-componentssub-packages depend on bothlodash(CJS) andlodash-es(ESM), and two minor versions of each end up in the tree. This means Rollup/Vite cannot deduplicate them, adding ~140 KB to the bundle unnecessarily.Request: migrate all
@ant-design/pro-*sub-packages to uselodash-esexclusively (as the ESM project standard), removing thelodashCJS dependency. This would also reduce tree-shaking friction.Issue 2 β react-is@16 transitive with React 19
react-is@16.13.1(fromrc-util@4.21.1) coexists with React 19 in our project. While this is not always a hard break, React 19 deprecated several lifecycle methods thatreact-lifecycles-compatandreact-is@16rely on. This can trigger runtime warnings and is flagged by React 19's strict mode.Request: bump
rc-utilto a version that depends onreact-is@17or later (which@ant-design/iconsalready does viarc-util@5.44.4βreact-is@18.3.1).Evidence
From
package-lock.jsonin our project (Donna, a React 19 internal tool):Questions
@ant-design/pro-*tolodash-es-only? (This is a known issue in the React ecosystem with ant-design packages.)rc-utilplanned to be bumped to5.xin@ant-design/pro-listto getreact-is@18?patch-packageas a local workaround β would you accept a PR for the lodash migration?Thank you for maintaining this excellent library.
Reported from project Donna (internal tool). lodash audit: 2 versions Γ 2 variants (CJS+ESM) = ~140 KB extra bundle. react-is: strict mode warnings on React 19.