Answers for "how to remove console.log from react native app"

0

how to remove console.log from react native app

module.exports = api => {
  const babelEnv = api.env();
  const plugins = [];
  //change to 'production' to check if this is working in 'development' mode
  if (babelEnv !== 'development') {
    plugins.push(['transform-remove-console', {exclude: ['error', 'warn']}]);
  }
  return {
    presets: ['module:metro-react-native-babel-preset'],
    plugins,
  };
};
Posted by: Guest on September-13-2021

Code answers related to "how to remove console.log from react native app"

Code answers related to "Javascript"

Browse Popular Code Answers by Language