Closed jimitndiaye closed 8 years ago
I myself have not had any luck structuring the output in webpack (and achieving fully relative references).
Since I was adding a hash to the filenames (for eventual CDN) I ended up putting everything in a flat directory.
However your paths should be correct if they were root relative.
Use the output.publicPath
option to prepend a slash, or the full public
URL.
That said there may be some option I didn't find to allow your fully relative structure.
@jimitndiaye what is your status? can i close this issue?
This never worked for me. I ended up having to embed the fonts to avoid the issue
Ok. As far as I can see this is a problem for the CSS loader chain, not resolve-url-loader
specifically. The resolve-url-loader
simply identifies the asset for webpack.
That said it is a shame we could not fix the problem.
I have the following set up:
As you can see, fonts are being redirected to a fonts folder and css files are redirected to a css folder. The generated CSS in the css folder has url references to
fonts/somefont.tff
instead of../fonts/somefont.tff
How can I fix this so that they point to the right paths?