gab*_*ans 9 javascript reactjs react-native
我有一个用react-native CLI制作的应用程序,我的RN版本是0.63,我收到烦人的moment.js警告,如下所示:
Require cycle: node_modules\moment\src\lib\create\local.js -> node_modules\moment\src\lib\create\from-anything.js -> node_modules\moment\src\lib\create\from-string-and-array.js -> node_modules\moment\src\lib\create\from-string-and-format.js -> node_modules\moment\src\lib\create\from-array.js -> node_modules\moment\src\lib\create\local.js
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用 LogBox 来忽略此警告,但它不起作用。
我在 App.js 文件中执行此操作:
import { LogBox } from 'react-native';
LogBox.ignoreLogs(['Require cycle:']);
Run Code Online (Sandbox Code Playgroud)
知道我怎样才能使它如此反应本机会忽略警告吗?
| 归档时间: |
|
| 查看次数: |
4056 次 |
| 最近记录: |