Skip to content

Commit

Permalink
feat: mark angular packages as side-effect free (#22785)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
IgorMinar authored and mhevery committed Mar 15, 2018
1 parent 0ebd577 commit 44de10e
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 20 deletions.
3 changes: 2 additions & 1 deletion packages/animations/browser/package.json
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion packages/animations/package.json
Expand Up @@ -20,5 +20,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/common/http/package.json
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion packages/common/package.json
Expand Up @@ -22,5 +22,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/compiler/package.json
Expand Up @@ -17,5 +17,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/core/package.json
Expand Up @@ -21,5 +21,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/forms/package.json
Expand Up @@ -23,5 +23,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/http/package.json
Expand Up @@ -22,5 +22,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/language-service/package.json
Expand Up @@ -13,5 +13,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/platform-browser-dynamic/package.json
Expand Up @@ -23,5 +23,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/platform-browser/animations/package.json
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion packages/platform-browser/package.json
Expand Up @@ -21,5 +21,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/platform-server/package.json
Expand Up @@ -27,5 +27,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/platform-webworker-dynamic/package.json
Expand Up @@ -24,5 +24,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/platform-webworker/package.json
Expand Up @@ -22,5 +22,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/router/package.json
Expand Up @@ -31,5 +31,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/router/upgrade/package.json
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion packages/service-worker/package.json
Expand Up @@ -24,5 +24,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/upgrade/package.json
Expand Up @@ -23,5 +23,6 @@
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/upgrade/static/package.json
Expand Up @@ -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
}

0 comments on commit 44de10e

Please sign in to comment.