diff --git a/config-serializer/webpack.config.js b/config-serializer/webpack.config.js index 73de174f..9498ad84 100644 --- a/config-serializer/webpack.config.js +++ b/config-serializer/webpack.config.js @@ -1,4 +1,5 @@ // var webpack = require("webpack"); +var webpackFailPlugin = require('webpack-fail-plugin'); module.exports = { entry: { @@ -24,7 +25,8 @@ module.exports = { ] }, plugins: [ - // new webpack.optimize.UglifyJsPlugin({ minimize: true }) + // new webpack.optimize.UglifyJsPlugin({ minimize: true }), + webpackFailPlugin ], node: { fs: "empty" diff --git a/gulpfile.js b/gulpfile.js index 2aca3378..a4be9156 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -24,7 +24,11 @@ gulp.task('watch', function () { gulp.task('webpack', function () { return gulp.src('./src/boot.ts') - .pipe(webpackStream(require('./webpack.config.js'))) + .pipe(webpackStream(require('./webpack.config.js')) + .on('error', function (error) { + // console.error(error.message); + this.emit('end'); + })) .pipe(gulp.dest('build/')); }); diff --git a/package.json b/package.json index 38faa17d..450d266a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "tslint": "^3.14.0", "webpack": "^1.13.1", "webpack-dev-server": "^1.14.1", + "webpack-fail-plugin": "^1.0.5", "webpack-stream": "^3.2.0", "webpack-svgstore-plugin": "^2.2.2", "yargs": "^4.8.1" diff --git a/webpack.config.js b/webpack.config.js index f5b834e1..dbf8fb0c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ // var webpack = require("webpack"); var SvgStore = require('webpack-svgstore-plugin'); +var webpackFailPlugin = require('webpack-fail-plugin'); module.exports = { entry: ['es6-shim', 'zone.js', 'reflect-metadata', './src/boot.ts'], @@ -57,7 +58,8 @@ module.exports = { ] } } - ) + ), + webpackFailPlugin ] }