I am facing an issue with my old JavaScript code as it is using unsafe-eval. The client has requested to remove unsafe-eval, but the code relies on the eval method in all JavaScript libraries. Removing unsafe-eval breaks the functionality of the code. How can I eliminate unsafe-eval without modifying the library code?
Which version should I use to avoid getting a nonce error? Currently, I am using version 2.0.2 and encountering the following error: https://i.sstatic.net/VYwfB.png
zone.min.js?_=1686053845269:1 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not allowed in the Content Security Policy directive: "script-src 'self' 'nonce-/jHqQHDI76+2UJhy0y0afg=='".
at new Function (<anonymous>)
at evalExpression (compiler.umd.min.js?_=1686053845269:6:1473)
at jitStatements (compiler.umd.min.js?_=1686053845269:21:30062)
at RuntimeCompiler._compileModule (compiler.umd.min.js?_=1686053845269:41:18413)
at RuntimeCompiler._compileModuleAndComponents (compiler.umd.min.js?_=1686053845269:41:16590)
at RuntimeCompiler.compileModuleAsync (compiler.umd.min.js?_=1686053845269:41:16063)
at PlatformRef_._bootstrapModuleWithZone (core.umd.min.js?_=1686053845269:35:26523)
at PlatformRef_.bootstrapModule (core.umd.min.js?_=1686053845269:35:25813)
at Object.initAngularComponents (consentRegistry.js?_=1686053845270:415:47)
at Object.init (consentRegistry.js?_=1686053845270:63:22)