From 9c3c1b760899abb6c1a5ce0832e9c98aabece746 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 8 Aug 2017 09:42:38 +0100 Subject: [PATCH] Make webpack exit non-zero on error Pass `--bail` to webpack, so that if we can't find a module, we bail out rather than deploy a broken version to /develop. https://github.com/webpack/webpack/issues/708 is somewhat relevant. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2b1d6e82d2..db4935f13a 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "build:res": "node scripts/copy-res.js", "build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js", "build:compile": "npm run reskindex && babel --source-maps -d lib src", - "build:bundle": "cross-env NODE_ENV=production webpack -p --progress", - "build:bundle:dev": "webpack --optimize-occurence-order --progress", + "build:bundle": "cross-env NODE_ENV=production webpack -p --progress --bail", + "build:bundle:dev": "webpack --optimize-occurence-order --progress --bail", "build:electron": "npm run clean && npm run build && npm run install:electron && build -wml --ia32 --x64", "build": "npm run reskindex && npm run build:res && npm run build:bundle", "build:dev": "npm run reskindex && npm run build:res && npm run build:bundle:dev",