Skip to content

Report error to webpack in callback #31

@lxndrdagreat

Description

@lxndrdagreat

I was wondering if it would be possible to catch an error in the plugin and return it, something like this.callback(errorHere, output, map). That way, Webpack actually marks it as a failed compile. I'm using TypeScript as a preprocessor; currently, I have errors logging to the console but Webpack continues on as if nothing is wrong. In my preprocessor, I could throw an Error, and if the plugin could catch it and pass it to Webpack that would be helpful.

Info about Webpack's callback here: https://webpack.js.org/api/loaders/#thiscallback

Thank you!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions