1
votes

I am having warnings while building the lib. Can't get rid of them. It seems that the problem comes from Uglify, but I don't see how can I pass any additional arguments to debug it. Console warnings

I have no errors or warnings in prettier or linter.

How can I delete them or more likely to check which part of code is wrong?

Related project: https://github.com/SAP/cloud-commerce-spartacus-storefront

1

1 Answers

1
votes

I was working on avoiding those warnings in Spartacus. I didn't find a solution to use additional commands to debug but I can provide some tips:

  • For mass warnings, (occurred after Angular update) the reason can be version of ng-packagr
  • Not usable arguments, usually ignored in tslint as _ e.g. ([_, item])
  • Code which will be changed by hoisting
  • Incomprehensible problem (meet once), which can be solved by verify that function existing before use - functionName && functionName(args)

My way to limit code to check was observing the history of builds and find a commit, after which the problem began.

https://github.com/SAP/cloud-commerce-spartacus-storefront/pull/2476/files https://github.com/SAP/cloud-commerce-spartacus-storefront/pull/4422/files