A Rollup plugin that runs a user-defined callback when the build encounters an error. Version 1.0.0 is the initial and only release. This is a minimal utility package with no dependencies. It differs from Rollup's built-in error handling by allowing custom side effects (e.g., logging, notifications) without altering the build's failure behavior.
npm install rollup-plugin-onerrorVerified import paths — ran on the pinned version, not inferred.
Basic setup: install, import as default, and pass a callback to handle build errors.
If you need to suppress exit code, use a different plugin or modify process.exitCode within the callback.
Access err.stack for more context. Consider wrapping the error if additional info is needed.
Change to 'import onError from 'rollup-plugin-onerror''
Use the function directly in the plugins array, not as a hook name.
No dependency data recorded yet.