Started getting the following warnings after migrating library from WebDataRocks to Flexmonter:
▲ [WARNING] This case clause will never be evaluated because it duplicates an earlier case clause [duplicate-case]
angular:script/global:scripts.js:835:520:
835 │ ...case h.input.Jf.hl.Dpa:case 4759:case 4345:case 4346:return f.Tl;
╵ ~~~~
The earlier case clause is here:
angular:script/global:scripts.js:835:432:
835 │ ... f.SY;case h.input.Jf.hl.Bpa:case 4345:case h.input.Jf.hl.Cpa:...
╵ ~~~~
▲ [WARNING] This case clause may never be evaluated because it likely duplicates an earlier case clause [duplicate-case]
angular:script/global:scripts.js:836:224:
836 │ ...ut.ta.jb;case f.Ua:case f.Tl:case f.Tl:case f.tn:return h.inpu...
╵ ~~~~
The earlier case clause is here:
angular:script/global:scripts.js:836:214:
836 │ ...turn h.input.ta.jb;case f.Ua:case f.Tl:case f.Tl:case f.tn:ret...
╵ ~~~~
▲ [WARNING] The "typeof" operator will never evaluate to "String" [impossible-typeof]
angular:script/global:scripts.js:1411:133:
1411 │ ...aption",k.caption);const n="String"==typeof k.type?l.i.Ra.LAa...
How can we fix or suppress these warnings?
Hello Samson,
Thank you for your question.
The mentioned messages are build-time warnings, not errors, and they do not affect Flexmonster behavior. The component should work as expected.
If you want to hide them, you can disable build warnings in your project configuration. For example, set the build option logLevel to error in your build configuration. It will still show actual errors.
Alternatively, you can configure logOverride to silence specific warning types, such as duplicate-case and impossible-typeof.
Please let us know if it works for you. Looking forward to hearing your feedback.
Kind regards,
Nadia
I'm having trouble locating where I'd configure the logOverride as you described for my Angular application utilizing the Flexmonster library. Could you please help and provide some examples on silencing those specific warnings you mentioned in your response?
Hello,
Thank you for the response.
The logOverride is a native ESBuild setting and can only be used with a custom ESBuild setup without the Angular CLI. Angular CLI does not expose esbuild’s logging configuration, meaning these options cannot be applied in an Angular project. Using a custom ESBuild configuration would bypass Angular CLI, so it is generally not recommended for standard Angular applications.
We want to explain that the reported messages are only build-time warnings, generated during optimization of minified code. They do not affect the build output or runtime behavior and can be safely ignored.
Please let us know if other questions arise.
Kind regards,
Nadia