This is a migrated thread and some comments may be shown as answers.

Size of Kendo download

2 Answers 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 11 Mar 2020, 11:55 AM

Plea for help:  Our front end guy left, and I've inherited his work :(   I like the JS stuff, but I'm no expert.

Our new app has about a 4 megabyte app.js download, even when minified.  We've turned on gzip compression on the server, and that gets it down to a bit over a meg, but we had a $1000 bandwidth overage last month!

I've been tasked with seeing if we are including unused code. 

So, my question:  In the docs I see this: 

// As an alternative, you could import only the scripts that are used by the utility:
// import '@progress/kendo-ui/js/kendo.data' // Imports only the DataSource script and its dependencies
 
import '@progress/kendo-theme-default/dist/all.css'
 
import { DataSource,
        HierarchicalDataSource,
        GanttDataSource,
        GanttDependencyDataSource,
        PivotDataSource,
        SchedulerDataSource,
        TreeListDataSource,
        DataSourceInstaller } from '@progress/kendo-datasource-vue-wrapper'
 
Vue.use(DataSourceInstaller)
 
new Vue({
   el: '#app',
   components: {
       DataSource,
        HierarchicalDataSource,
        GanttDataSource,
        GanttDependencyDataSource,
        PivotDataSource,
        SchedulerDataSource,
        TreeListDataSource,
        DatasourceInstaller
   }
})

 

I've got about six of these:  layout, dateinputs, inputs, dropdowns, dialog, etc.  

If I can identify which of the features I need from each I need from each "wrapper", can I cut this down?  For instance, I'm sure we don't use gantt charts or pivots above.

Thanks, 

Ed Greenberg

2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 13 Mar 2020, 08:14 AM

Hello Ed,

You can safely leave out the code for the widgets you do not use by importing only the ones you need. Please refer to our Script Size Optimization article for further information. You can also build a custom bundle ( kendo.custom.min.js file ) which includes the scripts you wish.

Let me know if the above information was helpful, or if you have any further questions.

Regards,
Martin
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ed
Top achievements
Rank 1
answered on 13 Mar 2020, 11:52 AM
Thank you. We're going to work through understanding this :)  
Tags
General Discussions
Asked by
Ed
Top achievements
Rank 1
Answers by
Martin
Telerik team
Ed
Top achievements
Rank 1
Share this question
or