Search code examples
javascriptasp.net-mvcweb-optimization

web optimization not rendering bundle


I have the following bundle configuration for my javascript.

`BundleTable.Bundles.Add(new ScriptBundle("~/Includes/Shop/js/bundles/abc").Include(
                "~/Includes/Shop/js/vendor/jquery-{version}.js",
                "~/Includes/Shop/js/vendor/jquery-ajaxq.js",
                "~/Includes/Shop/js/vendor/knockout-{version}.js",
                "~/Includes/Shop/js/vendor/lodash-{version}.js"
                ));`

The issue is when I call it in my partial view, it's just outputting the "Includes/Shop/js/bundles/abc" as the script source. The optimization part is turned off.

Should point out I am using this with sitecore cms.

[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(NAMESPACE.UI.BundleConfig), "Start")]

What would cause the bundle not to output these files, I know they exist on the file system.


Solution

  • The issue turns out to have been the version of web grease, 1.5.2 didn't work, but 1.6 did.