1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Does Webpack remove by default consol.log() in an Angular Application or has to be set with a...

Discussão em 'Angular' iniciado por Roberto Guardascione, Junho 25, 2025.

  1. This is my first post, I hope I'll be clear with the question and the context that led me to ask it. I am a novice\amateur "web programmer" ( just 1 and a half years of "working" background in Java and Javascript\Typescript with Angular ) and right now, with some friends, we are developing a small project to just get more into it in our free time.

    We are far from a "complete project", but there were some discussions about vulnerability issues related to the log inside our .ts files. The basic understanding I have it's that webpack, in the bundling and packaging phase, creates a main.js and polyfills.js file with the code minified and transpiled.

    Does Webpack remove by default console.log() in an Angular Application ( in a production environment ), or does it have to be set with a proper configuration or plugin?

    I know for sure that related to this topic (vulnerability issues ), this is not the first thing that should come to our mind, and there are other issues that should be considered before this one. I also understand that maybe this post could trigger some real and professional programmers, and I acknowledge that. I have a lot of failures, practice, and learning ahead of me, but I don't want to be afraid to ask.

    P.S.: I tried to search for related topics, but the only things I found were about optimization and extra data being transferred.

    Thank you to everyone in advance, just for the time spent.

    Continue reading...

Compartilhe esta Página