I have diffrent scripts online in a url:
externalurl/inte/common/js/script1.js
externalurl/inte/common/js/script2.js
externalurl/inte//common/js/script3.js
externalurl/inte//common/js/script4.js
externalurl/inte//common/js/script15.js
How can I create a javascript bundle for external javascript not in my solution?
bundles.Add(new ScriptBundle("~/bundles/inte").Include(
"http://url/inte/common/js/script1.js",
"http://url/inte/common/js/script2.js",
"http://url/inte/common/js/script2.js));
If you use CDN jQuery you should enable CDN support bundles.UseCdn = true;
public static void RegisterBundles(BundleCollection bundles)
{
bundles.UseCdn = true; //enable CDN support
//add link to jquery on the CDN
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"));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With