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

bundle size increased a lot with v5 #38720

Closed
mzaien opened this issue Nov 18, 2022 · 5 comments
Closed

bundle size increased a lot with v5 #38720

mzaien opened this issue Nov 18, 2022 · 5 comments

Comments

@mzaien
Copy link

mzaien commented Nov 18, 2022

Reproduction link

#38671 (comment)

Steps to reproduce

upgrade to ant design v5 then build react project

What is expected?

bundle size would be much smaller after dropping moment.js

What is actually happening?

it increased by 55kb

Screenshot 1444-04-25 at 1 08 20 AM

Environment Info
antd 5.0.0
React CRA/ react 18.2.0
System macos 16.0.1
Browser brave
@github-actions
Copy link
Contributor

You may look for issues:

  1. 56% Unable to customize Input.password font size #37766

🤖 By issues-similarity-analysis

@Dunqing
Copy link
Contributor

Dunqing commented Nov 19, 2022

Because rc-picker still supports moment.js, but antd uses dayjs, bundler does not contains moment.js.

image

@Dunqing
Copy link
Contributor

Dunqing commented Nov 19, 2022

And cssinjs bundles styles in js, so main.css is reduced, but main.js is increased.

@Dunqing
Copy link
Contributor

Dunqing commented Nov 19, 2022

The Antd team will soon optimize the size of the styles generated in cssinjs to reduce the size of js

@afc163
Copy link
Member

afc163 commented Nov 19, 2022

css bundle size moved to js bundle size.

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

3 participants