Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report error to webpack in callback #31

Closed
lxndrdagreat opened this issue Dec 6, 2019 · 0 comments
Closed

Report error to webpack in callback #31

lxndrdagreat opened this issue Dec 6, 2019 · 0 comments
Assignees

Comments

@lxndrdagreat
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants