I am using webpack with css-loader, style-loader and ExtractTextPlugin to generate css files.
I would like to replace certain URLs used in those CSS files.
For example:
url('../fonts/icomoon.ttf?asbl3h')
url('../../fonts/whatever.ttf?asbl4h')
should become
url('fonts/icomoon.ttf?asbl3h')
url('fonts/whatever.ttf?asbl4h')
The fonts are not necessarily in the right relative folder. I am using webpack to generate css with a plugin to copy all the fonts to a certain folder.
What is the best way to do this?
As a fallback it would be ok to just perform string replaces.