In my ASP.NET Web Forms project, i am using bundling and minification. I want to use Fontawesome CDN with fallback support but problem is that only CDN is working and as a fallback my downloaded local Fontawesome is not working.
I am using StyleBundleFallback for stylebundle cdn fallback.
I have checked that i am referencing fontawesome correctly.
Although Bootstrap 5 is working fine but only fontawesome is not working.
Here is my code:
bundles.Add(new StyleBundle("~/webfont", fontico)
.IncludeFallback("~/Content/font-awesome/css/all.css", "sr-only", "width",
"1px"));
Above code is working fine because it is using correct cdn url. You can try to modify this url to make a fallback so that it should use local fontawesome file but it is not working.
As far as I know, this works the other way around. i.e. tries the CDN first, fails to a local version of the library if the CDN isn't available.