Last active
March 30, 2023 17:20
-
-
Save lrsbt/3177e046cf3f679a9440a832011688a0 to your computer and use it in GitHub Desktop.
Expo alias path using @ example ( Expo v6.3.2 )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (api) { | |
api.cache(true); | |
return { | |
presets: ['babel-preset-expo'], | |
plugins: [ | |
["module-resolver", { | |
"alias": { | |
"@app": "./src", | |
}, | |
"extensions": [ | |
".ts", | |
".tsx", | |
] | |
}], | |
] | |
}; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Box, Text } from "@app/Components"; ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"paths": { | |
"@app/*": ["src/*"] | |
} | |
}, | |
"extends": "expo/tsconfig.base", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment