From 7a5ff97dfc74f5e958e3bbaefc2c7e1c582e6a1a Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Sat, 9 Jul 2022 12:49:07 +1200 Subject: [PATCH] Remove console logs from production --- babel.config.js | 5 +++++ package.json | 1 + 2 files changed, 6 insertions(+) diff --git a/babel.config.js b/babel.config.js index 9bbc48f..232b6fc 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,9 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: ['react-native-reanimated/plugin', 'react-native-paper/babel'], + env: { + production: { + plugins: ['transform-remove-console'], + }, + }, }; diff --git a/package.json b/package.json index 3f9b6ee..7326f88 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@react-navigation/native-stack": "^6.6.2", "@types/react-native-sqlite-storage": "^5.0.2", "@types/react-native-vector-icons": "^6.4.11", + "babel-plugin-transform-remove-console": "^6.9.4", "date-fns": "^2.28.0", "react": "18.0.0", "react-devtools": "^4.24.7",