father 默认兼容 ie11 导致构建尺寸偏大
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- babel, typescript
- Domain
- build-system, performance
Research direction
Start with the targets section in father’s config documentation and inspect how rc-util’s build currently applies the default IE11 target. Compare a modern-browser target such as Chrome 86 with the current output, including the minified and gzipped bundle size. Done means the target choice is defined and the reported bundle-size reduction is verified without changing the intended build behavior.
Written by the indexing model from the issue text.
Description
根据 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)
- Dominant language
- TypeScript
- Stars
- 670
- Forks
- 205
- Avg merge
- 15d 17h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-component/util
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
react-component/util#816 ·
-
injectCSS method not attaching csp nonce passed to it. it is used in antd components internally Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
react-component/util#671 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
react-component/util#738 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-component/util#710 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
react-component/util#647 · 5 comments ·
All issues in react-component/util
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
AOSSIE-Org/DebateAI#582 · 2 comments ·