Skip to content

Commit 29515bc

Browse files
petebacondarwinchristopherthielen
authored andcommitted
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 #382
1 parent a3ae4f9 commit 29515bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"entryFile": "src/index.ts"
5252
}
5353
},
54+
"sideEffects": true,
5455
"repository": {
5556
"type": "git",
5657
"url": "https://github.com/ui-router/angular-hybrid.git"

0 commit comments

Comments
 (0)