0

From this post I can bundle a single CDN file. So How to bundle many CDN files in one line ? Do I only need a list of strings and repeat this line for each item?

  public static void RegisterBundles(BundleCollection bundles){ 
    bundles.UseCdn = true;
    var jqueryCdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js";
    bundles.Add(new ScriptBundle("~/bundles/jquery",
            jqueryCdnPath).Include("~/Scripts/jquery-{version}.js"));
  }
Bellash
  • 7,560
  • 6
  • 53
  • 86

1 Answers1

0

I think your answer is here: https://stackoverflow.com/a/31069580/2158136

When you use a CDN, you can“t bundle them in one line.

Even, if you add multiple bundles with the same virtual path, only the last item will be considered (It happened to us, and it took some time before we realized what was happening). You have to add one line per each CDN that you need to add to the bundle.

Community
  • 1
  • 1