-
Notifications
You must be signed in to change notification settings - Fork 116
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
Cannot import resolved path #187
Comments
@NXTaar I'm not sure that webpack can affect somehow on postcss-import. |
postcss have nothing to do with webpack. Just checkout postcss-import options in the readme. You will find what you look for. |
The problem stays
my post css option
It still looking in the
also tried |
@import './colors.scss' ? |
still the same
Maybe i was setting the |
why do you use path.resolve with an absolute path? |
Try adding a slash at the end of the path |
also sidenote: using autoprefixer as the first plugin is bad as anything imported or generated by precss will not be prefixed |
Because i'm on windows, using path.resolve makes slash handling more stable between different OS (on Mac and Linux there is no need of path.resolve)
thanks, moved it to the end
Done. still nothing. How exactly should i import the |
@NXTaar Try to change |
@NXTaar Your precss module must under postcss-import. It works for me.
|
Don't use autoprefixer before postcss-import, inline source won't be prefixed. |
@MoOx Thanks, should I put autoprefixer below precss? |
Definitely. autoprefixer should be called after all plugins that might generate rules. Btw @ai should display a note in bold in the README like I am doing for this plugin (postcss-import). |
@MoOx maybe you should add check that import is on first place? You have all API for it. |
Maybe someday. But people might want to lint first, so not sure... |
There is no way to use webpack aliases within postcss-import ? |
@Tux1 postcss is separate from webpack so I don't think it's possible |
May be enhanced-resolve can help. Your postcss.config.js can be like this:
And use it like this:
|
i have
postcss-import
configured and here is myresolved
part inwebpack.config.js
.When i try to import resolved path in some .css files like this
I'm getting this error
looks like it doesn't know about webpack's resolve path, and tries import the file, as it's placed near the current css file
The text was updated successfully, but these errors were encountered: