babel-plugin-root-import使用react-native 0.43.3导入错误路径

时间:2017-04-16 17:37:26

标签: react-native babel-plugin

我这样称呼它:import { SplashContainer, FooterTabsContainer, SettingsContainer } from '~/containers' 它应该从目录/Users/jasan/Desktop/ReactModoro/app/containers读取 它似乎在路径中添加app/containers/Navigator

我的babel rc文件: { "presets": [ "react-native-stage-0" ], "plugins": [ ["babel-root-import", { "rootPathSuffix": "app" }] ]}

screenshot_2017_04_16_20_18_22

1 个答案:

答案 0 :(得分:3)

react-native start --reset-cache解决了它。没有更多的错误