webpack/postcss-loader

Exceptions in postcssFactory are swallowed

Closed this issue · 1 comments

Hi.

https://github.com/webpack-contrib/postcss-loader/blob/a0c6e3fd2d484b0af86afcd073cbcd1895108d33/src/index.js#L114-L121

There is a bug on L121: in case the exception is thrown before processor is initialized (in my case, it was "true is not a PostCSS plugin"), then that exception is swallowed, and the code fails in processor.version.startsWith check instead.

The fix would be to add && processor condition to this "if".

Please always use the issue template