Hook webpack 'after-emit' instead of 'done' so it works with webpack middleware