Closed ridhansholeh closed 2 years ago
Hi @ridhansholeh,
Do you build your web environment by Vite? If yes, you can try to add the following code in your "vite.config.ts":
export default (...) => {
return defineConfig({
...,
build: {
...
terserOptions: {
compress: {
drop_console: ENV.VITE_BUILD_DROP_CONSOLE === TRUE,
// disable console in prod.env
drop_debugger: ENV.VITE_BUILD_DROP_DEBUGGER === TRUE,
// disable debug in prod.env
},
},
},
})
}
For Webpack, maybe the plugin can help you: https://www.npmjs.com/package/remove-console-webpack-plugin
hello i see in my browser console its showing config mqtt such as username, password, etc. when try to reconnect. how to disable this console log on production server?