UNPKG

703 BJavaScriptView Raw
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"use strict";
4Object.defineProperty(exports, "__esModule", { value: true });
5class 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}
15exports.KarmaWebpackThrowError = KarmaWebpackThrowError;
16//# sourceMappingURL=/users/hansl/sources/angular-cli/plugins/karma-webpack-throw-error.js.map
\No newline at end of file