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

father 默认兼容 ie11 导致构建尺寸偏大 #531

Open
guoyunhe opened this issue May 8, 2024 · 1 comment
Open

father 默认兼容 ie11 导致构建尺寸偏大 #531

guoyunhe opened this issue May 8, 2024 · 1 comment

Comments

@guoyunhe
Copy link

guoyunhe commented May 8, 2024

根据 father 的文档 https://github.com/umijs/father/blob/master/docs/config.md#targets 使用 babel 构建默认兼容 ie11,导致产物体积偏大(尤其是 @babel/runtime 引入的很多)。而 antd 5 是不支持 ie 的,这些 polyfill 就显得不是很必要。是否可以考虑将 targets 改为 { chrome: 86 } 之类的现代浏览器配置?

经过我的测试,可以将 rc-util 的 bundle 体积从 2.8kB 减少到 1.7kB (minified + gzipped)

@arvinxx
Copy link

arvinxx commented Dec 6, 2024

在 antd v6 里应该可以做了。不过感觉这个会发一个大版本?

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

No branches or pull requests

2 participants