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

Bundle Size Issue

I was experimenting with asp.net mvc controls for our new project. I have observed that bundle size of scripts seems to be big. Is it normal or I am doing some thing wrong
my bundle.config looks like this
public static void RegisterBundles(BundleCollection bundles)
{
            BundleTable.EnableOptimizations = true;
            //bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
            //            "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/ejscripts").Include(                       
                       "~/Scripts/jquery.easing-1.3.min.js",
                       "~/Scripts/jquery.globalize.min.js",
                       "~/Scripts/jsrender.min.js",
                       "~/Scripts/ej/ej.web.all.min.js",
                        "~/Scripts/ej/ej.unobtrusive.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));
            //bundles.Add(new StyleBundle("~/Content/ej/bootstrap-theme/css").Include(
            //          "~/Content/ej/web/bootstrap-theme/ej.web.all.min.css",
            //          "~/Content/ej/web/responsive-css/ej.responsive.css",
            //          "~/Content/ej/web/responsive-css/ejgrid.responsive.css"
            //          ));
        }

Firebug screenshot is as follows



1 Reply

KS Kaviyarasu Sivasenapathi Syncfusion Team March 10, 2016 01:55 PM UTC

Hi Muhammad, 

 


Thank you for contacting Syncfusion Support.

 


Yes, it is possible to reduce the file size of the scripts. We have checked with your code example in that we found that you have used ej.web.all.min.js file which is the combination of all our EJ controls. Instead of using this entire script file, you can use only  the required script and theme files based on the components that you are using in your application. It can be achieved by Custom script generator utility which is in the following online link

 

Custom script generator

 

To know more about how to generate the script for the required components, please refer the following getting started link

 

https://help.syncfusion.com/js/getting-started-on-linux

 

Please let us know if you have any queries.

 


Regards
Kaviyarasu S


Loader.
Live Chat Icon For mobile
Up arrow icon