Is there a way to overwrite publicPath that CSS loader is using?
All our CSS assets are in a flat structure. Therefore all relative URLs are simply ./[asset name]. However, we serve static assets from ./static path relative to the current URL, therefore our output.publicPath is ./static/.
Unfortunately, CSS picks up the output.publicPath and attempts to resolve ./static/static/[asset name].
It is the https://github.com/webpack/extract-text-webpack-plugin that uses the output.publicPath to resolve URLs and there is options.publicPath to overwrite it.
@gajus Would you like to post your code ? I seemed to encounter the same question.
Sorry, it has been too long. Though as the former comment states, the solution is in the ExtractText config, not css-loader.
On Jun 20, 2016, at 20:06, Aflext Yang [email protected] wrote:
@gajus Would you like to post your code ? I seemed to encounter the same question.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@gajus Thanks a lot anyway!
Most helpful comment
It is the https://github.com/webpack/extract-text-webpack-plugin that uses the
output.publicPathto resolve URLs and there isoptions.publicPathto overwrite it.