emit compilation error for better feedback

Webpack apparently aims for brevity in build errors, unless they're specifically emitted as an error. This change gives the user some more context of what exactly went wrong, instead of just where the problem was.