How to disable esbuild direct-eval warning

Discussão em 'Angular' iniciado por Nathan30, Dezembro 3, 2024.

  1. Nathan30

    Nathan30 Guest

    In one of my apps I need the eval function. I search and can't something to replace it. When I upgrade to Angular 19, I have the following Warning in the build-watch and build-prod :

    ▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]

    src/frontend/app/statistics/statistics.component.ts:554:14:
    554 │ eval(option['function'] + '(' + cpt + ')');
    ╵ ~~~~

    You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval


    Where can I disable this warning ? I didn't find any esbuild config (like eslint) or something

    Thanks

    Continue reading...

Compartilhe esta Página