我正在尝试从我的 react-native 应用程序的输出中删除 console.log 输出,但是当我运行时
ENVFILE=.env.production react-native run-android --variant=release
和
亚行日志猫
我仍然看到我的应用程序的数据被记录到控制台。
我使用了以下文档:https : //facebook.github.io/react-native/docs/performance.html#using-consolelog-statements。
这是我的 .babelrc 文件:
{
"presets": ["react-native"],
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
}
Run Code Online (Sandbox Code Playgroud)
我错过了什么?我在 react-native 0.60.3 上使用 "babel-plugin-transform-remove-console": "^6.9.4",