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

Huge bundle size without any explicit use, only of antd #198

Closed
itayganor opened this issue Dec 22, 2019 · 6 comments
Closed

Huge bundle size without any explicit use, only of antd #198

itayganor opened this issue Dec 22, 2019 · 6 comments

Comments

@itayganor
Copy link

Hi there.
In my project I use antd for components and FontAwesome for icons. I never explicitly use icons from Ant Design (Not a single <Icon/> component in my project).
Despite that, I can see that in my bundle.js, @ant-design/icons is about 0.5MB (!) in size.

image

In order to optimize antd imports, I use babel-plugin-import as such:

["import", {
  "libraryName": "antd",
  "libraryDirectory": "es",
  "style": true
}]

But it doesn't seem to help with reducing the unused icons size taken in my bundle.

@patrickomeara
Copy link

I am also having this issue, we only use the table component but the whole library is included.

It's adding too much overhead. Is it possible to minimize this?

image

@patrickomeara
Copy link

patrickomeara commented Jan 13, 2020

Looks like it's a major issue that is fixed in 4.0

ant-design/ant-design#20661

@wzhudev
Copy link
Collaborator

wzhudev commented Jan 13, 2020

Please refer to ant-design/ant-design#12011.

@wzhudev wzhudev closed this as completed Jan 13, 2020
@itayganor
Copy link
Author

Please refer to ant-design/ant-design#12011.

It is all Chinese. It is not possible to refer people to texts they can't read.

@wzhudev
Copy link
Collaborator

wzhudev commented Jan 15, 2020

@itayganor There are some comments in English. You can use some help from those, and Google Translate.

@nwoeddie
Copy link

nwoeddie commented May 3, 2020

For future me and fellow Googlers...

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

4 participants