When running command
ng-packagr -p ng-package.json
I get the following output
Building Angular library
- - - skipped 8 lines - - -
Side effects in initialization of unused variable Cm [0:2339,29]
Side effects in initialization of unused variable Jm [0:2361,29]
Dropping duplicated definition of variable FO [0:11798,34]
Side effects in initialization of unused variable ES [0:13236,33]
- - - skipped 4 lines - - -
Built Angular library from MY_PROJECT_PATH written to MY_PROJECT_PATH/dist
Should I be worried about those Side effects
and Dropping duplicated
lines? What kind of side effects are we talking about here?
The interesting thing is that they weren't there a few builds ago.
Searching ng-packagr side effects
on SO, did not produce any results - am I the only one that's interested in this?
testMethod(componentId: string){
if (componentId) {
let data = componentId; // Duplicate name but correct for TS
data = 'test data';
console.log(data);
} else {
let data = '234'; // Duplicate name but correct for TS
data = '456';
console.log(data);
}
}
I guess, something about conversion from TS to JS in "ng-packagr" between "let" and "var" are not 100% correct because of scoping difference. I have no third-package in my project, so "peerDependencies" should not be the reason of my warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With