Analogous to onBuildStart and onBuildEnd, take in a script to execute when there is a webpack compilation error.