I pushed a PCF to a solution in my environment using the PAC CLI tool. I followed the guidelines in this link:
Common issues and workarounds (Power Apps Component Framework) - Power Apps | Microsoft Docs
I tried both solutions:
1. 'msbuild /p:configuration=Release'
2. 'npm run build -- --buildMode production'
but I am still seeing 1200+ warnings of this type originating from my PCF.
Issue
Usage of the JavaScript eval function should be limited where possible. The eval function can be a dangerous function as it allows strings to be executed as scripts within the context of the caller. This can be exploited to run malicious code. Eval is also usually slower than other options due to the lack of optimizations of the script text passed to eval. If this error is reported for a Power Apps component framework code component created using CLI tooling, package your control with 'msbuild /p:configuration=Release' or 'npm run build -- --buildMode production' to produce a release build that does not include 'eval' usage.
Does anyone have a solution to this warning?