Does Ant Design Library size effect website performance?

Viewed 35
  1. Does Ant Design Library size effect website performance? or adding lot of libraries in react will effect website speed ?

while looking on Ant.Design library size its showing 49MB , means while installing the antd libraries entire components are installing i guess.

  1. if am importing only table component from antd does this loads whole library ?

  2. Does this library size will effect the website in any ways? Is there any possibility to install the needed components separately?

i have found a section in antd documentation , its showing below enter image description here what does its means? only the components we imported only gets bundles in the build?

  1. Finlay one more question if i installed a library and not used it in the code does this library will be get bundled in the build?
1 Answers
  1. First question, Huge library size it will affect website performance, but tree-shaking can solve this problem. And Ant Design support tree-shaking.

  2. If you import only table component from antd, it will not load the whole library

  3. Yes, because if the website is too large, it will take a long time for users to load. You can use tree-shaking solve this problem.

  4. import { Button } from 'antd'; It is only install Button Component code to your bundled, not all antd component.

Tree Shaking, Code Splitting There are two good solutions when it comes to website size problem.

Related