From 44de10e2dba6a3bb7c766c194f6b5bf96aa19d10 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 14 Mar 2018 18:30:18 -0700 Subject: [PATCH] feat: mark angular packages as side-effect free (#22785) This flag is picked up by webpack v4 and used for more agressive optimizations. Our code is already side-effect free, because that's what we needed for build-optimizer to work. PR Close #22785 --- packages/animations/browser/package.json | 3 ++- packages/animations/package.json | 3 ++- packages/common/http/package.json | 3 ++- packages/common/package.json | 3 ++- packages/compiler/package.json | 3 ++- packages/core/package.json | 3 ++- packages/forms/package.json | 3 ++- packages/http/package.json | 3 ++- packages/language-service/package.json | 3 ++- packages/platform-browser-dynamic/package.json | 3 ++- packages/platform-browser/animations/package.json | 3 ++- packages/platform-browser/package.json | 3 ++- packages/platform-server/package.json | 3 ++- packages/platform-webworker-dynamic/package.json | 3 ++- packages/platform-webworker/package.json | 3 ++- packages/router/package.json | 3 ++- packages/router/upgrade/package.json | 3 ++- packages/service-worker/package.json | 3 ++- packages/upgrade/package.json | 3 ++- packages/upgrade/static/package.json | 3 ++- 20 files changed, 40 insertions(+), 20 deletions(-) diff --git a/packages/animations/browser/package.json b/packages/animations/browser/package.json index 880efc9afb..ecf1219d1b 100644 --- a/packages/animations/browser/package.json +++ b/packages/animations/browser/package.json @@ -3,5 +3,6 @@ "typings": "./browser.d.ts", "main": "../bundles/animations-browser.umd.js", "module": "../esm5/browser.js", - "es2015": "../esm2015/browser.js" + "es2015": "../esm2015/browser.js", + "sideEffects": false } diff --git a/packages/animations/package.json b/packages/animations/package.json index 79d303fd69..67c5937ec2 100644 --- a/packages/animations/package.json +++ b/packages/animations/package.json @@ -20,5 +20,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/common/http/package.json b/packages/common/http/package.json index 68ca9e6410..0489daf013 100644 --- a/packages/common/http/package.json +++ b/packages/common/http/package.json @@ -3,5 +3,6 @@ "typings": "./http.d.ts", "main": "../bundles/common-http.umd.js", "module": "../esm5/http.js", - "es2015": "../esm2015/http.js" + "es2015": "../esm2015/http.js", + "sideEffects": false } diff --git a/packages/common/package.json b/packages/common/package.json index 8f7e92cf75..15f9a248a3 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -22,5 +22,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/compiler/package.json b/packages/compiler/package.json index 73b6f08d6b..3ebb95d54e 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -17,5 +17,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/core/package.json b/packages/core/package.json index 60f1ab549d..7d10332ca3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -21,5 +21,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/forms/package.json b/packages/forms/package.json index 45cd19e2b7..84f1024e4c 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -23,5 +23,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/http/package.json b/packages/http/package.json index 585c55636d..033d6f21c4 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -22,5 +22,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/language-service/package.json b/packages/language-service/package.json index 27fd0ce4a9..3ace4708da 100644 --- a/packages/language-service/package.json +++ b/packages/language-service/package.json @@ -13,5 +13,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/platform-browser-dynamic/package.json b/packages/platform-browser-dynamic/package.json index 176865c235..b22bcbbd98 100644 --- a/packages/platform-browser-dynamic/package.json +++ b/packages/platform-browser-dynamic/package.json @@ -23,5 +23,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/platform-browser/animations/package.json b/packages/platform-browser/animations/package.json index e3e9257753..a9ba708df0 100644 --- a/packages/platform-browser/animations/package.json +++ b/packages/platform-browser/animations/package.json @@ -3,5 +3,6 @@ "typings": "./animations.d.ts", "main": "../bundles/platform-browser-animations.umd.js", "module": "../esm5/animations.js", - "es2015": "../esm2015/animations.js" + "es2015": "../esm2015/animations.js", + "sideEffects": false } diff --git a/packages/platform-browser/package.json b/packages/platform-browser/package.json index df7033367a..acd7061418 100644 --- a/packages/platform-browser/package.json +++ b/packages/platform-browser/package.json @@ -21,5 +21,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/platform-server/package.json b/packages/platform-server/package.json index cbe32b2086..f9a8b53162 100644 --- a/packages/platform-server/package.json +++ b/packages/platform-server/package.json @@ -27,5 +27,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/platform-webworker-dynamic/package.json b/packages/platform-webworker-dynamic/package.json index 4d10e28518..7e38926762 100644 --- a/packages/platform-webworker-dynamic/package.json +++ b/packages/platform-webworker-dynamic/package.json @@ -24,5 +24,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/platform-webworker/package.json b/packages/platform-webworker/package.json index 9573902a3a..5bf243c23b 100644 --- a/packages/platform-webworker/package.json +++ b/packages/platform-webworker/package.json @@ -22,5 +22,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/router/package.json b/packages/router/package.json index 9c03191579..6b601313dc 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -31,5 +31,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/router/upgrade/package.json b/packages/router/upgrade/package.json index d0a8ff2847..08760c4e32 100644 --- a/packages/router/upgrade/package.json +++ b/packages/router/upgrade/package.json @@ -3,5 +3,6 @@ "typings": "./upgrade.d.ts", "main": "../bundles/router-upgrade.umd.js", "module": "../esm5/upgrade.js", - "es2015": "../esm2015/upgrade.js" + "es2015": "../esm2015/upgrade.js", + "sideEffects": false } diff --git a/packages/service-worker/package.json b/packages/service-worker/package.json index e68b774546..d1e29d53cc 100644 --- a/packages/service-worker/package.json +++ b/packages/service-worker/package.json @@ -24,5 +24,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index a87d79ad07..51ea799c6a 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -23,5 +23,6 @@ }, "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" - } + }, + "sideEffects": false } diff --git a/packages/upgrade/static/package.json b/packages/upgrade/static/package.json index e1f556eaf8..547f78f706 100644 --- a/packages/upgrade/static/package.json +++ b/packages/upgrade/static/package.json @@ -3,5 +3,6 @@ "typings": "./static.d.ts", "main": "../bundles/upgrade-static.umd.js", "module": "../esm5/static.js", - "es2015": "../esm2015/static.js" + "es2015": "../esm2015/static.js", + "sideEffects": false }