I also had this same error message. I had to do a combination of the answers listed in this thread:
1/ Add this line of code as suggested by @Simon C:
.Include("~/Content/font-awesome-4.0.3/css/font-awesome.css", new CssRewriteUrlTransform());
This worked to fix the relative urls, however, I had to delete the font-awesome.min.css
file from my bower directory every time I published otherwise the bundler would get confused and not include and minify the font-awesome.css
file. So...
2/ I had to do what @miha suggested in a comment and fix the relative urls in the font-awesome.min.css
file with CssRewriteUrlTransform()
. So I decided to rewrite the urls in the .min file and just include that instead of the unminified version and it worked:
.Include("~/Content/font-awesome-4.0.3/css/font-awesome.min.css", new CssRewriteUrlTransform());
If I understand correctly, the bundler won't try to minify the .min file again because it's already minified. The only "drawback" is it does not concatenate the font-awesome.min.css
content into the single css file that the bundler creates. It will be included separately.