IMPORTANT EDIT - 5th November 2023
This gist was posted several years ago, and it worked back then. Before stating "this doesn't work", make sure you check the comments below the gist as others may have provided more recent instructions for more recent versions of Expo.
Original Content
These 2 files show how to correctly setup an Expo project to use alias paths with typescript.
Where you might import a component like this:
import MyComponent from "../../../components/path/to/my/component"
You can instead use:
import MyComponent from "@Components/path/to/my/component"
Edit
All Path Alias configs in
tsconfig.json
must be inside the compilerOptions sectionIn Expo SDK 49 just follow these steps from docs: https://docs.expo.dev/guides/typescript/#path-aliases
tscofig.json
app.json
Importing your components
In this case, there is no need to install
babel-plugin-module-resolver
module