From 2a99ac054d100a9d415e4ab2199f8568aa418f6e Mon Sep 17 00:00:00 2001 From: Joel Cogen Date: Tue, 9 Apr 2019 18:17:19 +0200 Subject: [PATCH] fix(cordova-build): only set sourceMap if specified (#107) --- builders/cordova-build/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builders/cordova-build/index.ts b/builders/cordova-build/index.ts index 8e076f2..945f756 100644 --- a/builders/cordova-build/index.ts +++ b/builders/cordova-build/index.ts @@ -47,7 +47,9 @@ export class CordovaBuildBuilder implements Builder { prepareBrowserConfig(options: CordovaBuildBuilderSchema, browserOptions: BrowserBuilderSchema) { const cordovaBasePath = normalize(options.cordovaBasePath ? options.cordovaBasePath : '.'); - browserOptions.sourceMap = options.sourceMap as any; + if (typeof options.sourceMap !== 'undefined') { + browserOptions.sourceMap = options.sourceMap as any; + } // We always need to output the build to `www` because it is a hard // requirement of Cordova.