-
-
Notifications
You must be signed in to change notification settings - Fork 211
Getting postcss to process imported css #35
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
Comments
Use |
@AndyHall the best way is to use one dependency tree for components. Require one component to other, not import one CSS file to other CSS. So, for example, you have
In require('./button.js');
require('./button.css'); So, if you need to use button inside a form, you write in require('../button'); |
@ai That's basically what I'm doing, it's just that the css is quite large and separated into modular pieces. With that said, I just found that passing {
test: /\.css$/,
loader: 'style-loader!css-loader?importLoaders=1!autoprefixer-loader',
} I'm brand new to webpack and I don't really understand the difference between this and using |
Yeap, BTW, |
Hmm, now that I check, adding By not official, do you mean |
Nope, |
Ah, I get you. Okay, thanks for your help! |
Hi,
I'm trying to run autoprefixer on CSS files that use
@import
. Using basic configs, I find that my root CSS file (that getsrequire
d through webpack) gets processed, but styles that are imported from CSS get added to the project but not processed by postcss.Is this supposed to work out of the box, or am I missing something obvious?
My webpack config is straight from the docs:
I run that with a root
foo.css
that importsbar.css
, and the results is that the page gets two style tags, one for each CSS file, and the imported one does not get processed:Thanks for any help!
The text was updated successfully, but these errors were encountered: