WebStorm 使用 react-native-web 导入错误?

WebStorm wrong import with react-native-web?

尝试使用 React Native 应用程序,我将 Webstorm 2019.3.4 与使用 expo init myProject

创建的简单空白 React-Native 应用程序项目一起使用

每当我使用 <Text> 等 react-native 组件时,WebStorm 都会提供自动导入功能

但是,组件是从错误的库中导入的。它从 react-native-web 而不是 react-native

中提取

这是默认值 package.json :

 "dependencies": {
   "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
   "react-native-web": "~0.11.7"
   ...

此处的自动导入功能如何?我如何切换到 react-native 导入?

谢谢

作为解决方法,请将 react-native-web/**/* 添加到 不完全导入自... 列表中 首选项 |编辑|代码风格 | JavaScript - 进口。 对于原生 React Native 组件自动导入的代码补全,请为这个问题投票并关注它的更新:WEB-35144