-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
In #261 it was discussed there could be two paths defined for one alias (if one path fails, there other could be used).
Is it possible that this implementation is broken? #376
used versions:
"babel-plugin-module-resolver": "^5.0.0",
"react-native": "0.70.6",
This does not work for me (babel.config.js):
module.exports = {
presets: ['module:metro-react-native-babel-preset', '@babel/preset-react'],
env: {
production: {
plugins: ['react-native-paper/babel'],
},
},
plugins: [
[
'module-resolver',
{
root: [
'./src',
],
alias: {
//'@brand': './src/Apps/brands/default',
'@brand': ['./src/Apps/brands/example','./src/Apps/brands/default'],
},
extentions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
],
};
This does work (difference is the path after '@brand' alias):
module.exports = {
presets: ['module:metro-react-native-babel-preset', '@babel/preset-react'],
env: {
production: {
plugins: ['react-native-paper/babel'],
},
},
plugins: [
[
'module-resolver',
{
root: [
'./src',
],
alias: {
'@brand': './src/Apps/brands/default',
//'@brand': ['./src/Apps/brands/example','./src/Apps/brands/default'],
},
extentions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
],
};
rvasseur31 and jmathew
Metadata
Metadata
Assignees
Labels
No labels