I have two questions, one about a bug and one about cdn
QUESTION 1: (BUG)
I have just added the new NuGet package: Microsoft ASP.NET Web Optimization Framework 1.0.0. I'm using ASP.NET MVC 3, and everything seems to be working except for one major bug.
If I use debug="true" in web.config, then no script tags ever get outputted. I checked the view source and there are no tags for that bundle at all.
If I set debug="false" then I get the script tag that points to my minification file.
*Is this a bug? Has anyone else experienced that? *
As a workaround so that I'm at least able to debug my application, I forced optimization on regardless if I'm in debug mode or not BundleTable.EnableOptimizations = true;
QUESTION 2: (CDN)
Also another question I have is about the CDN Support:
bundles.Add(new ScriptBundle("~/bundles/jquery",
jqueryCdnPath).Include(
"~/Scripts/jquery-{version}.js"));
If I want to add another script with CDN support, then I would have to add another bundle, therefore if UseCdn="false", then it will try and load up 2 scripts separately, meaning 2 requests. Is there any way to have CDN support for multiple scripts so that it will combine them into 1 request if UseCdn="false"?
Something like this:
bundles.Add(new ScriptBundle("~/bundles/multiple").Include(
"~/Scripts/jquery-{version}.js", jqueryCdnPath,
"~/Scripts/jquery-ui-{version}.js", jqueryUICdnPath,
));
Regards DotnetShadow