Skip to content

Exceptions in postcssFactory are swallowed #537

@dko-slapdash

Description

@dko-slapdash

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions