1module.exports = api => {
2 const babelEnv = api.env();
3 const plugins = [];
4 //change to 'production' to check if this is working in 'development' mode
5 if (babelEnv !== 'development') {
6 plugins.push(['transform-remove-console', {exclude: ['error', 'warn']}]);
7 }
8 return {
9 presets: ['module:metro-react-native-babel-preset'],
10 plugins,
11 };
12};
13