public static void RegisterBundles(BundleCollection bundles) { bundles.IgnoreList.Clear(); BundleTable.Bundles.ResetAll(); BundleTable.EnableOptimizations = !HttpContext.Current.IsDebuggingEnabled; RegisterContentBundles(bundles); RegisterScriptBundles(bundles); bundles.ForEach(b => b.Orderer = new SyncBundleOrder()); }
public static BundleCollection ApplyHashCache(this BundleCollection bundleCollection, bool addHashToPath = true, bool useServerCache = false, HttpCacheability httpCacheability = HttpCacheability.NoCache, string hashPathParameterName = null) { var transform = new HashCacheTransform() { AddHashToPath = addHashToPath, HttpCacheability = httpCacheability, HashPathParameterName = hashPathParameterName, UseServerCache = useServerCache }; bundleCollection.ForEach(bundle => bundle.Transforms.Add(transform)); return(bundleCollection); }