0

As the title states, my font awesome (v4.5.0) will not load if I set BundleTable.EnableOptimizations = true;. When it is set to false the file loads fine.

I have checked out a bunch of google and stackoverflow posts and all of them say I need to add CssRewriteUrlTransform() to my bundle config. I did that, so now my font awesome bundle looks like this:

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

I have ensured the file exists and is in the correct location, but as I mentioned earlier it loads up fine when optimizations are disabled.

Is there anything else I can try?

Anders
  • 12,088
  • 34
  • 98
  • 146
  • 2
    Seems likely your problem relates to using a real folder that actually exists as your bundle path. Change your bundle name from `~/Content/fontawesome` to something like, say, `~/bundles/fontawesome` and see if it helps. See: http://stackoverflow.com/questions/12240097/mvc4-bundling-does-not-work-when-optimizations-are-set-to-true – stephen.vakil Jan 20 '16 at 19:22
  • Yup that seemed to be the case. Thanks! – Anders Jan 20 '16 at 20:01

0 Answers0