Found this snippet to add cdn file into bundle:
public static void RegisterBundles(BundleCollection bundles)
{
//bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
// "~/Scripts/jquery-{version}.js"));
bundles.UseCdn = true; //enable CDN support
//add link to jquery on the CDN
var jqueryCdnPath = "https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js";
bundles.Add(new ScriptBundle("~/bundles/jquery",
jqueryCdnPath).Include(
"~/Scripts/jquery-{version}.js"));
}
But is there any way to add multiple cdn files into that bundle? We have locally hosted cdn if that makes a difference, so the url for jqueryCdnPath would start with https://localhost... most likely (comes from config).
Include() supports array of string (but my understanding is these are local files only used when Debuggin), but for cdn part (used in release mode) I cannot see this to be the case??
Found this question here, there is no answer and it is from 2013 so thought maybe something has changed since then..
Many Thanks