Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi everyone, I cannot get my bundle to work. I am using Umbraco version 7.6.3 assembly: 1.0.6361.21154.
I have created folder called App_Start within my project. I have added a class within the folder called BundleConfig.cs
Class code
public class BundleConfig : IApplicationEventHandler { public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { } public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { //Scripts BundleTable.Bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/scripts/jquery.min.js", "~/scripts/jquery.easing.1.3.js", "~/scripts/bootstrap.min.js", "~/scripts/jquery.waypoints.min.js", "~/scripts/main.js" )); //CSS BundleTable.Bundles.Add(new StyleBundle("~/bundles/style").Include( "~/css/animate.css", "~/css/icomoon.css", "~/css/simple-line-icons.css", "~/css/bootstrap.css", "~/css/style.css", "~/css/BootstrapOveride.css", "~/Content/font-awesome.min.css" )); } public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { } }
I have also added the following code to the appSettings within the webconfig
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles/" />
I have also set the debug to false within the webconfig any pointers much appreciated.
Hi Tom,
What is the problem with your bundle ? Is not rendering anything or just not bundled and minified ?
Dave
By the way...I once created a package that allows you to main your bundles through a config file :
https://our.umbraco.org/projects/developer-tools/booteasy-client-bundling/
Hi,
Have you added a Global.asax.cs file and changed the Global.asax to reference it?
<%@ Application Inherits="YOURNAMESPACE.Global" Language="C#" %>
That's the bit I always forget to do :)
These references help:
Steve
Hi everyone, my bundle looks like it's being fired with I step through the debugger, but still no CSS or JS
When I viewed the page source code the bundles are empty
<link href="/bundles/css" rel="stylesheet"/>
You've named the bundle /bundles/style
So hit that in the browser - does that work?
Thanks Steve and thank you everyone for your help much appreciated :)
You're very welcome! Glad to help - definitely been there - amazing what a fresh pair of eyes does to your sanity!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Optimisation - bundles
Hi everyone, I cannot get my bundle to work. I am using Umbraco version 7.6.3 assembly: 1.0.6361.21154.
I have created folder called App_Start within my project. I have added a class within the folder called BundleConfig.cs
Class code
I have also added the following code to the appSettings within the webconfig
I have also set the debug to false within the webconfig any pointers much appreciated.
Hi Tom,
What is the problem with your bundle ? Is not rendering anything or just not bundled and minified ?
Dave
By the way...I once created a package that allows you to main your bundles through a config file :
https://our.umbraco.org/projects/developer-tools/booteasy-client-bundling/
Hi,
Have you added a Global.asax.cs file and changed the Global.asax to reference it?
<%@ Application Inherits="YOURNAMESPACE.Global" Language="C#" %>
That's the bit I always forget to do :)
These references help:
Steve
Hi everyone, my bundle looks like it's being fired with I step through the debugger, but still no CSS or JS
When I viewed the page source code the bundles are empty
You've named the bundle /bundles/style
So hit that in the browser - does that work?
Thanks Steve and thank you everyone for your help much appreciated :)
You're very welcome! Glad to help - definitely been there - amazing what a fresh pair of eyes does to your sanity!
is working on a reply...