blutorange / closure-compiler-maven-plugin

Combine and minimize JavaScript with Closure Compiler.
http://blutorange.github.com/closure-compiler-maven-plugin
Apache License 2.0
52 stars 6 forks source link

Relative paths in CSS and Maven minification? #24

Closed blutorange closed 5 years ago

blutorange commented 5 years ago

Issue by Hemanshu1belani Wednesday Apr 19, 2017 at 06:12 GMT Originally opened as https://github.com/samaxes/minify-maven-plugin/issues/143


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.

blutorange commented 5 years ago

Comment by bakaibalazs Saturday Sep 02, 2017 at 21:27 GMT


Hi! Is there any solution for rhis?

blutorange commented 5 years ago

CSS/Yui Compressor is out-of-scope now.