2

Seems this is not solved besides being a recurrent question.

This is my folder structure:

project/
 |
 |--src/
 |   |--images/
 |   +--styles/
 |        +--style.css
 | 
 +--build/
     |--images/
     +--style.min.css

Note how src/styles/style.css will reference url(../images/image.png) while the minified version build/style.min.css should reference url(images/image.png)

What combination of options for cssmin or clean-css can achieve this?

My current configuration:

cssmin: {
  target: {
    files: {
      'build/style.min.css': 'src/styles/style.css'
    }
  }
}
Naoise Golden
  • 8,793
  • 4
  • 49
  • 65
  • I would recommend simplify life and keep same relative folder structure for css/images. So I would simply use `build/styles/style.min.css`. – dfsq Feb 15 '15 at 17:15
  • You need to set your paths according to the final destination folder, assume your files was in that folders. – fractefactos Nov 01 '16 at 06:09

0 Answers0