postcss / postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.
MIT License
1.16k stars 67 forks source link

Webpack hangs #67

Closed hannujaakkola closed 7 years ago

hannujaakkola commented 7 years ago

I've tried to setup postcss with webpack, but I just can't get nested arguments work. The following css compiles with postcss-cli but with webpack css-loader & postcss-loader it just hangs forever. It works if there's only one nested style though.

.foobar { .foo { color: red; } .bar { color: blue; } }

Sorry if this is wrong place to ask, but I'm just so lost with postcss and I'm thinking of going back to less because I can't figure this out.

My postcss.config.js: module.exports = { plugins: [ require('postcss-import'), require('precss'), require('autoprefixer'), require('postcss-nested'), require('postcss-color-function'), require('postcss-initial'), require('postcss-simple-vars') ] }

Does the order of plugins matter?

ai commented 7 years ago

It is webpack config problem. Can you ask question to postcss-loader please?

jonnolen commented 6 years ago

@hannujaakkola did you ever resolve this?

hannujaakkola commented 6 years ago

The problem was that I had postcss-loader v1, updating to v2 resolved all issues.