In css-loader v0.28, I used root option ,but In css-loader v1.0.0,the option was removed,I checked the changelog(https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md) and Found this:
remove root option, use postcss-loader with postcss-url plugin
but I could not integrate postcss-url very well.
for example,my previous css-loader option was:
{
loader: 'css-loader',
options: {
root: 'static',
minimize: true
}
}
So when I wrote some css snippet like that :
background-image: url("/mobile/img/logo-new.png");
after css-loader parsed,it would changed to:
background-image: url("/static/mobile/img/logo-new.png");
I like previous style but maybe we should upgrade css-loader,so should use postcss-url.I could not use it very well,the docs also could not give me more info,so I came here and hope someone could help me.
what postcss-url option should I use to get the correct answer?