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.
Unfortunately, activation email could not send to your email. Please try again.

Bundle Size Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

123347 Mar 9,2016 05:18 AM Mar 10,2016 08:55 AM ASP.NET MVC 1
loading
Tags: General
Muhammad Tassadaque Zia
Asked On March 9, 2016 05:18 AM

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



Kaviyarasu Sivasenapathi [Syncfusion]
Replied On March 10, 2016 08:55 AM

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

 

http://help.syncfusion.com/js/include-only-the-needed-widgets

 

Please let us know if you have any queries.

 


Regards
Kaviyarasu S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;