andywer / webpack-blocks

📦 Configure webpack using functional feature blocks.
MIT License
2.97k stars 94 forks source link

Outdated PostCSS README #312

Closed ghost closed 5 years ago

ghost commented 5 years ago

Currently the root README has this for CSS handling in the example code:

...
match(['*.css', '!*node_modules*'], [
    css(),
    postcss([
      autoprefixer({ browsers: ['last 2 versions'] })
    ])
  ]),
...

However, passing an array to postcss throws an error:

Error: Passing PostCSS plugins as a first argument is not supported anymore, 
use options.plugins instead

So the correct way is:

...
match(['*.css', '!*node_modules*'], [
    css(),
    postcss({ 
      plugins: autoprefixer({ browsers: ['last 2 versions'] })   // <------
    })
  ]),
...

Please update README

andywer commented 5 years ago

Thanks for reporting, @edward-hong!

You describe exactly what's wrong and the exact patch to fix it. Why didn't you just open a PR? 😅

Will fix it straight away 😉