Skip to content

Commit e7b3d7a

Browse files
authored
Merge pull request #6996 from StoDevX/drew/babel-silence-console
perf: use babel to remove console logs in production
2 parents b72b555 + 57f09ec commit e7b3d7a

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ module.exports = {
88
// the react-native-reanimated plugin must come last
99
'react-native-reanimated/plugin',
1010
],
11+
env: {
12+
production: {
13+
plugins: ['transform-remove-console'],
14+
},
15+
},
1116
}

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"ajv-keywords": "5.1.0",
132132
"babel-core": "7.0.0-bridge.0",
133133
"babel-jest": "29.4.3",
134+
"babel-plugin-transform-remove-console": "6.9.4",
134135
"eslint": "8.39.0",
135136
"eslint-config-prettier": "8.6.0",
136137
"eslint-plugin-babel": "5.3.1",

0 commit comments

Comments
 (0)