borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

Dist and Src directories not working #85

Closed AntonGrekov closed 4 years ago

AntonGrekov commented 4 years ago

Idea of plugin is great, but realization is not completed. Most of the time sources of .css (f.e. i like to use sass) and images lay in directory './src', while "compiled" files are in './dist' (or even farer directory, like for WP - ./wp-content/themes/themeName/etc).

The problem here is that you have to use exact same directory layout in './src' and in './dist' directory. Layout has to be same for .css files and images relative to .css files

This is because when u write "resolve('image.png')", it resolves path to image.png relatively to sources of .css (in my case to main.scss)

AntonGrekov commented 4 years ago

it all fixes with "relative: string" property sorry to bother :)