I am in the process of deploying my first ReacctJs application and I will like to deactivate any data from my application that shows in the console of the browser. This includes the redux store Logger, console.logs code etc.
I have tried out several approaches as I can find on google.
My store code looks as follows
const loggerMiddleware = createLogger({
predicate: (getState, action) => process.env.NODE_ENV !== 'production'
});
export const store = createStore(
rootReducer,
applyMiddleware(
thunkMiddleware,
loggerMiddleware
)
);
I have installed the transform-remove-console package and created a .babelrc in my root folder with the following content
{
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
}
None of above codes removes things in the console. Please any ideas around this will be highly appreciated.