postcss / postcss-url

PostCSS plugin to rebase url(), inline or copy asset.
MIT License
376 stars 58 forks source link

Ignoring absolute file references. #69

Closed DylanPiercey closed 7 years ago

DylanPiercey commented 8 years ago

My config:

{
    url: 'inline',
    basePath: './client'
}
body {
    background: url('/img/test.png');
}

I would expect that the test image would be inlined however https://github.com/postcss/postcss-url/blob/master/index.js#L163 prevents this.

I would rather not use relative urls in my css file.

sekoyo commented 8 years ago

I have this issue too, did you figure it out? wouldn't prefer to avoid ../../../ and have to refactor if files get moved. Why would absolute urls be ignored?

DylanPiercey commented 8 years ago

@DominicTobias I could not figure this out. Strangely it was only happening in some projects. I tried digging through the code in this module but could not figure out why it was happening so I used a different module.

sekoyo commented 8 years ago

Did you use postcss-assets instead? thinking about it as I know that works from another project

DylanPiercey commented 8 years ago

Yes

sergcen commented 7 years ago

now it's should inline files