Let's assume our app is offline, i.e. we can't use 3rd party CDNs thus we're creating our own.
I'd like to host all of the vendor scripts in a separate (Parent) web app and then include them in the bundles in several other MVC Apps.
bundles.UseCdn = true;
I have found a solution, which has nothing to do with CDN. Basically, granted the
childWeb is hosted in the
parentWeb's subdirectory, the following bundle configuration in the
childWeb apps picks the file from the parentWeb and bundles them as usual:
bundles.Add( new ScriptBundle( "~/bundles/VendorScripts").Include( "~/../Scripts/jquery.js", "~/../Scripts/Scripts/jquery-ui.js", "~/../Scripts/globalize.js"));
the important bit being:
~/../, which takes you one level up from the root location.