The problem
I have a workflow setup where maven combines and minifies multiple css files into one single file for a production environment.
The problem I'm facing is that font and image paths are breaking after running minification, as they're still pointing towards their existing relative file paths.
As an example:
Within static/homepage/startup/common-files/css/icon-font.css I have the following CSS rule:
@font-face{font-family:Flat-UI-Icons;src:url(../fonts/Startup-Icons.eot);
In my pom, I specify that I want the output of my minified css file to be style.min.css located at static/css/custom/homepage/. The problem with this is that the filepath changes, resulting in all font and image dependencies to no longer be found and return a 404 status in the browser.
The problem I have a workflow setup where maven combines and minifies multiple css files into one single file for a production environment.
The problem I'm facing is that font and image paths are breaking after running minification, as they're still pointing towards their existing relative file paths.
As an example:
Within
static/homepage/startup/common-files/css/icon-font.css
I have the following CSS rule:@font-face{font-family:Flat-UI-Icons;src:url(../fonts/Startup-Icons.eot);
In my pom, I specify that I want the output of my minified css file to be style.min.css located at static/css/custom/homepage/. The problem with this is that the filepath changes, resulting in all font and image dependencies to no longer be found and return a 404 status in the browser.