2

I posted last year on the same issue. here But this time I did same as previous but I am having error different. Now font is looking root level like this.

http://www.dev.com/Content/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2?v=4.3.0 

config

  bundles.Add(new StyleBundle("~/content/specss").Include(
     "~/Content/bootstrap.css",
    "~/Content/Css/site.css",
    "~/Content/Css/sidenav.css",
    "~/Content/overlay.css").Include("~/Content/font-awesome-4.3.0/css/font-awesome.css", 
                                       new CssRewriteUrlTransform()));

enter image description here

but it suppose to look at http://www.dev.com/iapps/ebiz/Content/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2?v=4.3.0 other bootstrap and else working fine.

Community
  • 1
  • 1
James123
  • 11,184
  • 66
  • 189
  • 343

2 Answers2

0

On my current project, I have mine set up as:

bundles.Add(new StyleBundle("~/Content/css").Include(
    "~/Content/bootstrap.css",
    "~/Content/site.css",
    "~/Content/font-awesome/css/font-awesome.css"));

I'm not familiar with the CssRewriteUrlTransform class, but I just include my font awesome css right in the same Include method as the other css sheets.

Eckert
  • 690
  • 4
  • 9
0

The only way i found is to recompile the css with less or scs, according to font-awesome documentation http://fontawesome.io/get-started/.

In my opinion, using StyleBundle and CssRewriteUrlTransform is a more flexible approach, but it seems that this is impossible for latest versions (i'm using the 4.7.0).

ElettroAle
  • 119
  • 1
  • 8