Where to find css & js bundles for serving from cdn

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 6 años
Hi,

Try using one of the CDN plugin available to achieve this.

Regards
Hace 6 años
Bundling and minification is enabled or disabled by setting the value of the debug attribute in the compilation Element in the Web.config file. In the following XML, debug is set to true so bundling and minification is disabled.To enable bundling and minification, set the debug value to "false". You can override the Web.config setting with the EnableOptimizations property on the BundleTable class.
BundleTable.EnableOptimizations = true;


Don’t add js & css directly by using html tags, follow below mention steps:-
Script
  Html.AppendScriptParts("~/Content/js/myscript.js");
CSS
Html.AppendCssFileParts("~/Content/css/mycss.css");

For bundling CDN url, follow below mentioned steps:-
@using System.Web.Optimization;
@{
     var bundles = BundleTable.Bundles;
     bundles.UseCdn =   true;
     bundles.Add(new ScriptBundle("~/bundles/jquery",
                "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.js"));
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.