Skip to content

Errors during plugin require() are masked #242

@eemeli

Description

@eemeli

When a plugin throws an error when it's required, postcss-cli always prints Plugin Error: Cannot find module '${plugin}' rather than reporting the actual error.

I spent a little while today debugging because of this, as I was getting the above error due to cssnano throwing a BrowserslistError due to a bad config. That root cause would have been significantly easier to figure out if the original error had not been masked.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions