Learning expo using the TabNavigation app.
I’d like to change two things with respect to the default way the files are setup.
I’d like to move all source code pertaining to the app under a directory called src. What do I need to change for this?
I want to specify a common root/root paths for all my imports so that i am no longer doing relative path imports. e.g. Assume that
blahStore.jsis located at
Instead of doing
import blahStore from '../stores/blahStore'from a file in another directory
I want to instead be doing
import blahStore from 'stores/blahStore'
I’ve seen this previous answer but it doesn’t seem very definitive. Relative paths with Expo
This also means the babel needs to look in the src directory and then the node_modules directory when searching for a module to import.