>>In other words, this compiles, but I am not sure if this is correct usage:
>>
>>
>> bundles.Add(new ScriptBundle("~/bundles/jquery.dataTables").Include("http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js","http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"));
>>
>>
>>UPDATE. Working through this blog post now
http://www.tomdupont.net/2012/03/configuring-bundles-in-mvc-4.html>>So far I managed to break the already working page, but hopefully will succeed at the end.
>>Thanks in advance.
>
>I think you can use BundleCollection.UseCdn which also allows for fallback if the CDN is not available.
>See 'Using a CDN' here:
http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minificationIs there a way to specify directory for all jquery, instead of providing cdn path for each individual jquery file?
Say, in the bundles.config I have
<jsBundles>
<add bundlePath="~/js/shared" minify ="true">
<directories>
<add directoryPath="~/scripts/jQuery/" searchPattern="*.js"></add>
<add directoryPath="~/scripts/" searchPattern="*.js"></add>
</directories>
<!--
<files>
<add filePath="~/scripts/jscript1.js"></add>
<add filePath="~/scripts/jscript2.js"></add>
</files>
-->
</add>
</jsBundles>
and I want to be able to add cdnPath for al jquery files.
If it's not broken, fix it until it is.
My Blog