I did not find a solution that allows you to import exactly the way you want, but there are some tips on how to configure import locations in this stream .
(Works in any JavaScript project, not just React Native, and allows you to write very short paths to link files.)
package.json src/ :
{
"name": "src"
}
, : src. / , ( , package.json), :
import Foo from 'src/components/foo';
React Native :
import Foo from 'MyApp/src/components/foo';
MyApp - , index.ios.js index.android.js.
AppRegistry,
AppRegistry.registerComponent('MyApp', () => AppRootComponent);