Skip to content

Commit

Permalink
Merge pull request #172 from TypeStrong/johnnyreilly-patch-1
Browse files Browse the repository at this point in the history
Update README.md to include fail build details
  • Loading branch information
jbrantly committed Apr 11, 2016
2 parents 0ef920e + 594f067 commit 9dfa2ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ The [tsconfig.json](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json)
TypeScript-related options so that your IDE, the `tsc` command, and this loader all share the
same options. TypeScript files from all subdirectories will get included except the ones matching `exclude`.

### Failing the build on TypeScript compilation error

When the build fails (i.e. at least one typescript compile error occured), ts-loader does **not** propagate the build failure to webpack. The upshot of this is you can fail to notice an erroring build. This is inconvenient; particularly in continuous integration scenarios. If you want to ensure that the build failure is propogated it is advised that you make use of the [webpack-fail-plugin](https://www.npmjs.com/package/webpack-fail-plugin). This plugin that will make the process return status code 1 when it finishes with errors in single-run mode. Et voilà! Build failure.

For more background have a read of [this issue](https://github.com/TypeStrong/ts-loader/issues/108).

#### Options

There are two types of options: TypeScript options (aka "compiler options") and loader options.
Expand Down

0 comments on commit 9dfa2ff

Please sign in to comment.