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.logstatements from project source called babel-plugin-transform-remove-consoleUsage:
add plugin name in
.babelrcfile.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
.babelrcfile is not exposed and requires me toejectfrom the react app?