Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 29, 2024
Merged

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

merged 1 commit into from
Apr 29, 2024

Conversation

guoyunhe
Copy link
Contributor

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

图片

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

@afc163 afc163 merged commit 027f680 into master Apr 29, 2024
8 checks passed
@afc163 afc163 deleted the peer-deps branch April 29, 2024 02:27
@gulang2016118136
Copy link

使用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
Copy link

cola639 commented Jun 23, 2024

使用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",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants