-
-
Notifications
You must be signed in to change notification settings - Fork 50.5k
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
refactor: 📦 smaller bundlesize limit #20356
Conversation
Deploy preview for ant-design failed. Built with commit e08153d69fe3c013c4aca590e86ce14b983b14e3 https://app.netlify.com/sites/ant-design/deploys/5e008f1945f3f40007880479 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e08f5ff:
|
Codecov Report
@@ Coverage Diff @@
## 4.0-prepare #20356 +/- ##
===============================================
+ Coverage 97.56% 97.57% +0.01%
===============================================
Files 295 295
Lines 6849 6754 -95
Branches 1878 1822 -56
===============================================
- Hits 6682 6590 -92
+ Misses 167 164 -3
Continue to review full report at Codecov.
|
有挑战才有意义。 这个先放在这里,跟踪一下大小。
|
下降了 |
c6e6ef3
to
36d1ef9
Compare
f94c890
to
d096c57
Compare
|
不会,我是觉得底层这些组件颗粒度还不够细,尤其现在 IE11 最低兼容后比如 Upload 就可以再重构下, animation 也是 |
browserslist 现在有设置么 |
应该有,可以试试。 |
|
400e78f
to
9ee2274
Compare
9ee2274
to
75e95ba
Compare
e08153d
to
f6207e0
Compare
移除掉 Grid 里这部分循环生成的样式代码后的结果点此查看。 - 53.45kb
+ 48.33kb |
f6207e0
to
e08f5ff
Compare
两个 action 留给 @zombieJ 尝试。
|
这个是不是也可以关了? #19871 |
好像没什么关系,#19871 是优化了 |
嗯,如果是这个问题那就解决了。 |
修了几个 bug,又过 300 了。我再调调…… |
不要使用momentjs好吗?58kb! |
@hc-codersatlas https://next.ant.design/docs/react/replace-moment-cn |
@zombieJ 看看能不能努力一下。
这个 PR 修改的地方有:
lazyload
属性,从而去掉对 react-lazy-load 的依赖。4.x 发布之后再统一上 rc-visual-list 来解决大数据问题。1.1kb
。enquire.js
的依赖,用原生 matchMedia 实现。最终体积优化效果:
6.25kb
。0.66kb
。css 里 50kb 目标还有 3kb,可能需要等 Grid 的 flex 优化才能做到。@zombieJ
移除掉这部分循环生成的样式代码后的结果点此查看。
close #19871