Search code examples
c#csssquishit

How to stop encoding of font-face file path during bundling and minification by SquishIt


I have a font face declaration like following

@font-face {
font-family: "PreloSlab";
src: url("../fonts/PreloSlab-ExtraBold.eot?#iefix") format("embedded-opentype"), url("../fonts/PreloSlab-ExtraBold.otf") format("opentype"), url("../fonts/PreloSlab-ExtraBold.woff") format("woff"), url("../fonts/PreloSlab-ExtraBold.ttf") format("truetype"), url("../fonts/PreloSlab-ExtraBold.svg#PreloSlab-ExtraBold") format("svg");
font-weight: 800;
font-style: normal;

}

After bundling

PreloSlab-ExtraBold.eot?#iefix

SquishIt changes it to

PreloSlab-ExtraBold.eot%3F%23iefix

The font file is not loading after this conversion. Can anyone please suggest a way to make it work without taking this CSS file out of bundle?


Solution

  • Upgrading SquishIt package and its dependencies fixed this issue.