Software engineer with 4+ years of experience in building products for numerous domains like fin-tech, real estate, video streaming, retail, and now e-commerce.
Software engineer with 4+ years of experience in building products for numerous domains like fin-tech, real estate, video streaming, retail, and now e-commerce.
This is a better option than assigning an empty function to console.log. The empty function removes the option to log anything in your production environment, even for debugging purposes.
If you are using Terser in your build, they provide an option to remove log statements (drop_console: true) from your minified code
There is plugin available to remove a
console.log
statements from project source called babel-plugin-transform-remove-consoleUsage:
add plugin name in
.babelrc
file.Thanks for your suggestions, I will try this one also
sure ðð»
This is a better option than assigning an empty function to
console.log
. The empty function removes the option to log anything in your production environment, even for debugging purposes.If you are using Terser in your build, they provide an option to remove log statements (drop_console: true) from your minified code
How do I achieve this in the modern cra-generated applications, where
.babelrc
file is not exposed and requires me toeject
from the react app?