andywer/webpack-blocks

Outdated PostCSS README

Opened this issue · 1 comments

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

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 😉