-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to resolve path alias? #122
Comments
Also running into this |
Same problem |
Could you provide a reproducible example? |
@IjzerenHein you can just ignite a new app, we have it running TS paths by default:
This will be an Expo Go application and you'll receive an error like the following:
If you want the native directories available, tack on |
In order to make it work for path alias, you need to add the alias also inside babel module-resolver plugin. This is my config using expo and typescript babel.config.jsmodule.exports = function (api) {
api.cache(true);
const plugins = [
'expo-router/babel',
[
'module-resolver',
{
alias: {
'~': '.',
},
},
],
];
plugins.push('react-native-reanimated/plugin');
return {
presets: ['babel-preset-expo'],
plugins,
};
}; tsconfig.json{
"extends": "expo/tsconfig.base",
"compilerOptions": {
...
"paths": {
"~/*": ["*"]
}
},
...
}
|
@
path alias is defined intsconfig.json
The text was updated successfully, but these errors were encountered: