Skip to content

Commit

Permalink
fix(package): mark package as having side-effects (#385)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
petebacondarwin authored and christopherthielen committed Dec 2, 2019
1 parent a3ae4f9 commit 29515bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"entryFile": "src/index.ts"
}
},
"sideEffects": true,
"repository": {
"type": "git",
"url": "https://github.com/ui-router/angular-hybrid.git"
Expand Down

0 comments on commit 29515bc

Please sign in to comment.