Add an Eleventy event that fires after errors #4120
Replies: 5 comments
|
maybe |
|
I feel like a JavaScript~y way would be |
|
If it were named
|
|
I was thinking on an Fine with me. |
|
maybe |
|
I feel like a JavaScript~y way would be |
|
If it were named
|
|
I was thinking on an Fine with me. |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I found out today that
eleventy.afteronly runs after successful builds; if an error occurs, it doesn't run. This is problematic for customizations that need to perform cleanup whether the build succeeds or not.Describe the solution you'd like
I presume we wouldn't want to alter the existing behavior of
eleventy.after. Can we add aneleventy.afterErroror something?Describe alternatives you've considered
I'm not aware if there's any other way of handling error cases from within
eleventy.config.js. Writing a wrapper around the entire build invocation is problematic, especially if it needs access to variables set up inside the config function.Additional context
No response
All reactions