Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): add "Failed to compile" message
Browse files Browse the repository at this point in the history
Add missing "Failed to compile" message when the webpack build is not
successful. This is useful for [background problem matchers](https://code.visualstudio.com/docs/editor/tasks#_background-watching-tasks).
Previously, it was not possible to tell using a regular expression when
the compiler has stopped when there was an error, as no message was
printed.

(cherry picked from commit 08fb32e)
  • Loading branch information
Extacy authored and clydin committed Oct 19, 2021
1 parent 008094b commit 227bf2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/angular_devkit/build_angular/src/dev-server/index.ts
Expand Up @@ -369,6 +369,8 @@ export function serveWebpackBrowser(

if (buildEvent.success) {
logger.info(`\n${colors.greenBright(colors.symbols.check)} Compiled successfully.`);
} else {
logger.info(`\n${colors.redBright(colors.symbols.cross)} Failed to compile.`);
}

return { ...buildEvent, baseUrl: serverAddress } as DevServerBuilderOutput;
Expand Down

0 comments on commit 227bf2e

Please sign in to comment.