Load only needed javascript in the page

In the getting started guide of your help website, you said to load the file 

<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
but this file has a weight of 2500KB and contains all the controls.

In my application, I'm using only the grid control, so it's useless to load everything.

How can I load only the required controls js files?
Where can I find documentation about that?



1 Reply

PS Pavithra Subramaniyam Syncfusion Team March 8, 2018 01:20 PM UTC

Hi Marco, 

You can load the required component packages by using Custom resource generator for Essential JavaScript 2. Please refer to the following steps. 

Step 1: Select the Required component from the component list In the below link. 

Custom Resource Generator: http://crg.syncfusion.com/ 

 

Step 2: Select the required theme from the style dropdown list. 

 


Step 3: Click the Download button to generate the resource. 

 

Step 4: Place the package in Script folder and Refer the generated packages in your application. 

<script src="~/Scripts/ej2.grid.min.js" type="text/javascript"></script> 


Regards, 
Pavithra S.   


Loader.
Up arrow icon