Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Add a note for url(...) with css-modules in webpack. #199

Closed
boopathi opened this issue Aug 20, 2015 · 2 comments · Fixed by #238
Closed

Add a note for url(...) with css-modules in webpack. #199

boopathi opened this issue Aug 20, 2015 · 2 comments · Fixed by #238

Comments

@boopathi
Copy link

When you use cssnext with webpack's css-loader in module mode, url(./file) is transformed to url(file). This is done by postcss-url included in cssnext. Because of this issue, if you use url(./image.png), the css-loader?module gets it as url(image.png) and treats it as a module and searches in moduleDirectories rather than the relative path.

So, with css-loader module mode, I guess it is correct to use { url: false } option in cssnext which is propagated to postcss-url. So can we add a note about this in this repo?

Related issues and discussions:

@MoOx
Copy link
Owner

MoOx commented Sep 13, 2015

I think we should fix the issue in postcss-url, which should not change path like that.

@MoOx
Copy link
Owner

MoOx commented Jan 4, 2016

postcss-cssnext do not handle url anymore (cssnext is now postcss-cssnext. cssnext is deprecated.) See postcss-cssnext migration guide http://cssnext.io/postcss/

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

Successfully merging a pull request may close this issue.

2 participants