From 29515bcb4a08c66f44cd54336b9749d0e0541b93 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 2 Dec 2019 17:35:37 +0000 Subject: [PATCH] fix(package): mark package as having side-effects (#385) By adding `"sideEffects": true` to the package.json we are telling ng-packagr that it should not apply the `"sideEffects": false` mark to the package.json that is published to npm. The result of a no-side-effect package is that the Angular CLI buildOptmizer to mark top level components as "PURE", which means that the subsequent production optimizations can remove unused functions but is also safe to rename them. AngularJS needs the names of components to remain stable since it uses reflection over the source code to find the name of components to instantiate. Fixes https://github.com/ui-router/angular-hybrid/issues/382 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index f04f6d08..a44635d0 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "entryFile": "src/index.ts" } }, + "sideEffects": true, "repository": { "type": "git", "url": "https://github.com/ui-router/angular-hybrid.git"