I am currently utilizing grunt to construct and deploy a basic angular web application that incorporates bootstrap and font-awesome. The project was initially set up using the yeoman generator-angular and constructed utilizing grunt serve:dist.
I have observed that some of the URLs in my CSS files are not being properly minified or revised.
Update: After researching grunt tasks, I believe the issue may be related to rebase in cssmin/clean.
By adding noRebase: true to the cssmin options, I managed to resolve some issues but encountered new ones.
When noRebase:true is not used, the minified CSS contains:
body{background-image:url(c:/dev/myapp/.tmp/images/ricepaper_v3.png);
@font-face{font-family:FontAwesome;src:url(/bower_components/components-font-awesome/fonts/fontawesome-webfont.eot?v=4.0.3);
It's clear that I don't want it to reference bower_components or my local path.
With noRebase: true:
body{background-image:url(../images/ricepaper_v3.png);
@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.0.3);
This adjustment fixes the fonts (which were never revised, so the name is correct), but breaks the background image since the image is now named something like "a120f004.ricepaper_v3.png"
My Gruntfile.js:
// Grunt tasks configuration...