How to configure the ASP.Net MVC bundleConfig class to bundles from Azure CDN
Tried several iterations of overriding PageHeadBuilder.cs to no avail
Tried this recommended method but it doesn't seem to work either
Does NopCommerce Team have a workaround response to store owners on how to resolve this persistent issue?
string bundleVirtualPath = GetBundleVirtualPath("~/bundles/styles/", ".css", partsToBundle);
//create bundle
lock (s_lock)
{
var bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
//var bundleCdnPath = "//myCDN.azureedge.net/bundles/styles/";
if (bundleFor == null)
{
var bundle = new StyleBundle(bundleVirtualPath, "https//myCDN.azureedge.net");
//bundle.Transforms.Clear();
//"As is" ordering
bundle.Orderer = new AsIsBundleOrderer();
//disable file extension replacements. renders scripts which were specified by a developer
bundle.EnableFileExtensionReplacements = false;
foreach (var ptb in partsToBundle)
{
bundle.Include(ptb, GetCssTranform());
}
BundleTable.Bundles.Add(bundle);
BundleTable.Bundles.UseCdn = true;
}
}
//parts to bundle
result.AppendLine(Styles.Render("bundleVirtualPath", "https//myCDN.azureedge.net").ToString());
}
return result.ToString();
}