We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Bloated vendor bundle when adding Syncfusion grid

Hi,

without Syncfusion my vendor bundle (generated with webpack) is about 220kb, when adding Syncfusion's Grid I'm about 1.4 MB:
import { L10n } from '@syncfusion/ej2-base';
import { ColumnDirective, ColumnsDirective, GridComponent, Inject, Page, Sort, Filter, Toolbar, Resize } from '@syncfusion/ej2-react-grids';

Is there a way to reduce the bundle size with an improved import?

Thanks!

1 Reply

DR Dhivya Rajendran Syncfusion Team January 22, 2020 11:59 AM UTC

Hi Jan, 

Thanks for contacting Syncfusion support. 

By default to render Grid with default Functionalities will take around 728kb. Because Grid will have built-in features(Search, Print, Selection) and contains EJ2 Base and EJ2-Data Dependencies. After injecting features like paging, filtering modules will increase the bundle size accordingly. Because for those features, we have used other individual Syncfusion EJ 2 components as dependencies. Please refer the below table for more the detailed information. 

Grid 
Size 
Comments 
Basic Grid (Without injecting any feature modules) 
Around 720kb 
Will have built in features (Selection, Print, Search features and base and data dependencies), 
Feature Injected Grid(Page, Sort, Filter, Toolbar, Resize
Around 1.4 MB 
For Paging: We have included the Pager component for this feature. 

For Filter : Depending on the filter type, we have used textbox, checkbox, Dialog, dropdown, autocomplete , radio ,button , datepicker,datetimepicker,buttons
Numeric TextBox components for user input and user interfaces. 

For Toolbar: We have used toolbar component as dependency. 

So the bundle size will increase as per the included subcomponents added according to the Injected features 

Please get back to us, if you need further assistance. 

Regards, 
R.Dhivya 


Loader.
Live Chat Icon For mobile
Up arrow icon