ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.5k stars 2.37k forks source link

feat(deps): add react-dom peer deps #6611

Closed guoyunhe closed 2 months ago

guoyunhe commented 2 months ago

https://bundlephobia.com/package/antd-mobile 上,bundle 分析会提示 react-dom 没有找到

图片

理论上任何会被 bundle 的依赖都应该在 dependencies 或者 peerDependencies 里。参考 antd 的 peerDependencies 就是有 react-dom 的,所以我在 antd-mobile 里也加上了。这样更加严谨一些,也能让 bundlephobia.com 之类的工具分析得更准确一些。

github-actions[bot] commented 2 months ago

Size Change: 0 B

Total Size: 352 kB

ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./lib/bundle/antd-mobile.compatible.umd.js` | 189 kB | | `./lib/bundle/antd-mobile.umd.js` | 144 kB | | `./lib/bundle/css-vars-patch.css` | 1.43 kB | | `./lib/bundle/style.css` | 18 kB |

compressed-size-action

github-actions[bot] commented 2 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./lib/bundle/antd-mobile.es.js 102 KB (-34.83 KB 🔽) 2.1 s (-25.46% 🔽) 275 ms (+58.95% 🔺) 2.4 s
github-actions[bot] commented 2 months ago

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6611.surge.sh

gulang2016118136 commented 2 weeks ago

使用Popover气泡组件,报错了: react-dom.development.js:86 Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here react 相关版本: "react": "^18.2.0", "react-dom": "^18.2.0", "react-i18next": "^14.1.2", "react-router-dom": "^6.21.0",

cola639 commented 1 week ago

使用Popover气泡组件,报错了: react-dom.development.js:86 Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here react 相关版本: "react": "^18.2.0", "react-dom": "^18.2.0", "react-i18next": "^14.1.2", "react-router-dom": "^6.21.0",