Skip to content

Overwrite publicPath #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gajus opened this issue Feb 13, 2016 · 5 comments
Closed

Overwrite publicPath #234

gajus opened this issue Feb 13, 2016 · 5 comments

Comments

@gajus
Copy link

gajus commented Feb 13, 2016

Is there a way to overwrite publicPath that CSS loader is using?

@gajus
Copy link
Author

gajus commented Feb 13, 2016

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].

@gajus
Copy link
Author

gajus commented Feb 13, 2016

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 gajus closed this as completed Feb 13, 2016
@aflext
Copy link

aflext commented Jun 20, 2016

@gajus Would you like to post your code ? I seemed to encounter the same question.

@gajus
Copy link
Author

gajus commented Jun 20, 2016

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.

@aflext
Copy link

aflext commented Jun 21, 2016

@gajus Thanks a lot anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants