Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2585
Guidance on ASP.NET MVC Bundles with Ignite UI
posted

We are using ASP.NET MVC bundles with Ignite UI controls. Our bundle loads the Infragistics scripts in the order below. We also have a JavaScript bundle that loads the Infragistics.load.js file. What we are seeing is when the site is applying the optimized bundles the Infragistics.theme.css class is being loaded due to the dependency found in the Infragistics.load.js file. This is causing our styles to be applied out of order so the screen looks different when optimization is turned on than when it is turned off. What we expected is for the "common" bundle to be referenced for the theme css rather than having the Infragistics.theme.css file load into the browser. Do you have recommendations on how to use bundling optimization with the way you have written Infragistics.loader.js and its dependencies on the theme file?

bundle = new StyleBundle("~/CSSBundles/common")

.Include("~/Content/IG/structure/jquery-ui.css", new RewriteUrlTransform())

.Include("~/Content/IG/structure/jquery.ui.css", new RewriteUrlTransform())

.Include("~/Content/IG/structure/jquery.ui.datepicker.css", new RewriteUrlTransform())

.Include("~/Content/IG/structure/jquery.ui.slider.css", new RewriteUrlTransform())

.Include("~/Content/IG/structure/jquery.ui.theme.css", new RewriteUrlTransform())

.Include("~/Content/bootstrap/css/bootstrap.min.css", new RewriteUrlTransform())

.Include("~/Content/bootstrap/css/bootstrap-flat.min.css", new RewriteUrlTransform())

.Include("~/Content/font-awesome/css/font-awesome.min.css", new RewriteUrlTransform())

.Include("~/Content/IG/themes/manh/infragistics.theme.css", new RewriteUrlTransform())


bundle = new ScriptBundle("~/JSBundles/infragistics/loader").Include(

"~/Scripts/IG/infragistics.loader.js");