From 4988dd631076cb7ed0b37f798d7c1d5e90f8888a Mon Sep 17 00:00:00 2001 From: JeroenVinke Date: Tue, 27 Jun 2017 23:14:01 +0200 Subject: [PATCH] fix(bundle): continue build in case of incorrect sourcemap --- lib/build/bundle.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/build/bundle.js b/lib/build/bundle.js index bb2a04b58..5d4ef1ece 100644 --- a/lib/build/bundle.js +++ b/lib/build/bundle.js @@ -164,9 +164,14 @@ exports.Bundle = class { let parsedPath = path.parse(file.path); - let base64SourceMap = Convert.fromSource(file.contents.toString()); + try { + let base64SourceMap = Convert.fromSource(file.contents.toString()); - if (base64SourceMap) { + if (base64SourceMap) { + return null; + } + } catch (error) { + // we don't want the build to fail when a sourcemap file can't be parsed return null; }