1 | // Force Webpack to throw compilation errors. Useful with karma-webpack when in single-run mode.
|
2 | // Workaround for https://github.com/webpack-contrib/karma-webpack/issues/66
|
3 | ;
|
4 | Object.defineProperty(exports, "__esModule", { value: true });
|
5 | class KarmaWebpackThrowError {
|
6 | constructor() { }
|
7 | apply(compiler) {
|
8 | compiler.plugin('done', (stats) => {
|
9 | if (stats.compilation.errors.length > 0) {
|
10 | throw new Error(stats.compilation.errors.map((err) => err.message || err));
|
11 | }
|
12 | });
|
13 | }
|
14 | }
|
15 | exports.KarmaWebpackThrowError = KarmaWebpackThrowError;
|
16 | //# sourceMappingURL=/users/hansl/sources/angular-cli/plugins/karma-webpack-throw-error.js.map |
\ | No newline at end of file |