-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Using url(path) with resolve.alias #49
Comments
https://github.com/webpack/css-loader#usage
|
Ah, of course, that makes sense. |
@sokra I tried this but I'm getting an error http://prntscr.com/afub2r am I missing something? |
I actually think this is a postcss/postcss-import issue, I've created a ticket there. |
@sokra |
It means that it's a module and not a relative path |
Pretty cool! Is this documented somewhere? |
|
I have a few images in a shared location, which I import in a
css
file. This shared location has a lot of code shared between 5 webapps within the same project, and I have defined the aliascommon-assets
in my config, which works great for every asset/module, except for css. The path is normalized bycss-loader
(I think?) to be relative, which breaks.Is there any clean way to use the alias, or do I have to go
url("../../../../../../../../common/assets/images/image.png")
instead of the much cleanerurl("common-assets/images/image.png")
? If I do the latter, the actual import becomesurl("./common-assets/images/image.png")
, which is wrong, and fails the build.The text was updated successfully, but these errors were encountered: