In ASP.Net MVC following was the way to load files from a cdn link and make it into a bundle:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.UseCdn = true;
var version = System.Reflection.Assembly.GetAssembly(typeof(Controllers.HomeController)).GetName().Version.ToString();
var cdnUrl = ConfigurationManager.AppSettings["cdnUrl"].ToString()+"/{0}?v=" + version;
bundles.Add(new ScriptBundle("~/bundles/jquery", string.Format(cdnUrl, "bundles/jquery")).Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval", string.Format(cdnUrl, "bundles/jqueryval")).Include(
"~/Scripts/jquery.validate*"));
bundles.Add(new ScriptBundle("~/bundles/modernizr", string.Format(cdnUrl, "bundles/modernizr")).Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap", string.Format(cdnUrl, "bundles/bootstrap")).Include(
"~/Scripts/bootstrap.js"));
}
How can I achieve the same functionality using LigerShark.WebOptimizer in ASP.Net Core MVC project targeting .net 6.0?
I have already added the below mentioned configuration in my appsetting.json file and registered the tag helpers as mentioned in the documentation which states that it will prepend the cdn url but its not working:
In ASP.Net MVC following was the way to load files from a cdn link and make it into a bundle:
How can I achieve the same functionality using LigerShark.WebOptimizer in ASP.Net Core MVC project targeting .net 6.0?
I have already added the below mentioned configuration in my appsetting.json file and registered the tag helpers as mentioned in the documentation which states that it will prepend the cdn url but its not working:
Here is the actual code I have used in my Program.cs file:
I also have multiple css files to be bundled and minified but I haven't added that to my code for better clarity.