From e0c4e2ee76b859efe0c4637cbe45015ab0c7a706 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 30 Nov 2017 15:16:53 +0000 Subject: [PATCH] fix(@angular/cli): use a more restrictive workaround for mapbox-gl workaround See https://github.com/angular/angular-cli/pull/7931#issuecomment-348032708 --- .../@angular/cli/models/webpack-configs/production.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@angular/cli/models/webpack-configs/production.ts b/packages/@angular/cli/models/webpack-configs/production.ts index bde81969cffb..72a4d81eefdc 100644 --- a/packages/@angular/cli/models/webpack-configs/production.ts +++ b/packages/@angular/cli/models/webpack-configs/production.ts @@ -118,11 +118,11 @@ export function getProdConfig(wco: WebpackConfigOptions) { } const uglifyCompressOptions: any = { - // Disabled because of an issue with Uglify breaking seemingly valid code: - // https://github.com/angular/angular-cli/issues/5804 - // Further investigation: - // https://github.com/mishoo/UglifyJS2/issues/2011 - comparisons: false + // Disabled because of an issue with Mapbox GL when using the Webpack node global and UglifyJS: + // https://github.com/mapbox/mapbox-gl-js/issues/4359#issuecomment-303880888 + // https://github.com/angular/angular-cli/issues/5804 + // https://github.com/angular/angular-cli/pull/7931 + typeofs : false }; if (buildOptions.buildOptimizer) {