Closed hannujaakkola closed 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') ] }
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?
It is webpack config problem. Can you ask question to postcss-loader please?
postcss-loader
@hannujaakkola did you ever resolve this?
The problem was that I had postcss-loader v1, updating to v2 resolved all issues.
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?