I am using Webpack and React. After several weeks of development in React and multiple third party libraries implemented, I got many warnings errors displayed in my inspector's console but they don't affect my application while running.
These errors are client side errors only.
However I don't want these errors to be displayed to other users if the website get public.
So how to prevent any inspector's console to display warning errors? I just checked on Facebook and saw Facebook just disabled the inspector and displayed a customized message.
I simply want to prevent warning messages to be printed in the console log automatically using JavaScript.
I've already tried the console.clear()
but it seems it works only for Firefox. I need something more global.