UNPKG

886 BJavaScriptView Raw
1// Don't emit anything when there are compilation errors. This is useful for preventing Karma
2// from re-running tests when there is a compilation error.
3// Workaround for https://github.com/webpack-contrib/karma-webpack/issues/49
4"use strict";
5Object.defineProperty(exports, "__esModule", { value: true });
6class KarmaWebpackEmitlessError {
7 constructor() { }
8 apply(compiler) {
9 compiler.plugin('done', (stats) => {
10 if (stats.compilation.errors.length > 0) {
11 stats.stats = [{
12 toJson: function () {
13 return this;
14 },
15 assets: []
16 }];
17 }
18 });
19 }
20}
21exports.KarmaWebpackEmitlessError = KarmaWebpackEmitlessError;
22//# sourceMappingURL=/users/hansl/sources/angular-cli/plugins/karma-webpack-emitless-error.js.map
\No newline at end of file