Feature: `buildError` hook to run when an error occurs
tropicalraisel opened this issue · comments
Tropical Raisel commented
This hook would be called every time an error occurs during builds. The error object would be passed to the callback.
Anthony Fu commented
I think we need to stick with Rollup's plugin API and add new hooks if it's absolutely necessary. In your case, I think it's better to do try-catch
in your transform / load hooks.
Tropical Raisel commented
True, but this would be triggered when any error is thrown. This could be great when detecting conflicts with other plugins, if an error stopped a build or threw an error that was intentionally ignored, and detecting framework-specific issues.