I'm using Webpack to process my CSS files. I want to rewrite url()
s in CSS files to keep referencing the original assets, just changing the URL.
For example this file:
/* src/main.css */
body {
background-image: url('image.png');
}
should compile to this
/* bundle/main.css */
body {
background-image: url('../src/image.png');
}
I found the rewrite-url-loader but this just does not work at all for me, it does nothing.
I've got the feeling that file-loader may be able to do just what I want to do but I can't figure out how.
Anyone got an idea?