ember-cli / broccoli-asset-rev

Broccoli plugin to add fingerprint checksums and CDN URLs to your assets
MIT License
86 stars 83 forks source link

Fingerprinting doesn't work with font files @font-face #73

Closed bogdansoare closed 9 years ago

bogdansoare commented 9 years ago

I need to serve fontawesome from my CDN, but broccoli-asset-rev ignores it in my CSS. I tried referencing the font with different urls /fonts, fonts/, ../fonts/ but it doesn't work.

I saw that there was a closed issue rickharrison/broccoli-asset-rev#42 with the same problems, but for me it doesn't work.

// ember-cli-build.js
fingerprint: {
      enabled: isProductionLikeBuild,
      prepend: 'http://name.s3.amazonaws.com/',
      extensions: ['js', 'css', 'png', 'jpg', 'gif', 'svg', 'eot', 'ttf', 'woff2', 'woff']
}
// app.scss
@font-face {
    font-family: FontAwesome;
    src: url(/fonts/fontawesome-webfont.eot?v=4.4.0);
    src: url(/fonts/fontawesome-webfont.eot?#iefix&v=4.4.0) format("embedded-opentype"),url(/fonts/fontawesome-webfont.woff2?v=4.4.0) format("woff2"),url(/fonts/fontawesome-webfont.woff?v=4.4.0) format("woff"),url(/fonts/fontawesome-webfont.ttf?v=4.4.0) format("truetype"),url(/fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular) format("svg");
    font-weight: 400;
    font-style: normal
}
rickharrison commented 9 years ago

Take out the ?v=4.4.0

bogdansoare commented 9 years ago

Thanks for the fast response, cheers.

joebartels commented 9 years ago

great timing! was just hitting this today +1

ef2k commented 9 years ago

Ran into this today! Just had to remove the query args and all was good.