TP-0 | Alias resolver

This commit is contained in:
Aman Chaturvedi
2023-09-20 13:58:55 +05:30
parent e8cacd5c59
commit 5a373f35f6
2 changed files with 44 additions and 4 deletions

View File

@@ -8,7 +8,23 @@ module.exports = {
cwd: 'babelrc',
extensions: ['.ts', '.tsx', '.js', '.ios.js', '.android.js'],
alias: {
'@cuteapp': './app',
'@components': './src/components',
'@hooks': './src/hooks',
'@actions': './src/action',
'@reducers': './src/reducer',
'@constants': './src/constants',
'@screens': './src/screens',
'@services': './src/services',
'@types': './src/types',
'@common': './src/common',
'@assets': './src/assets',
'@store': './src/store/store',
'@utils': './src/utlis',
'@rn-ui-lib/components': './RN-UI-LIB/src/components',
'@rn-ui-lib/icons': './RN-UI-LIB/src/Icons',
'@rn-ui-lib/styles': './RN-UI-LIB/src/styles/index',
'@rn-ui-lib/colors': './RN-UI-LIB/src/styles/colors',
'@rn-ui-lib/utils': './RN-UI-LIB/src/utlis',
},
},
],

View File

@@ -5,9 +5,33 @@
/* Visit https://aka.ms/tsconfig.json to read more about this file */
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["dom","es5","es2020"],
"lib": [
"dom",
"es5",
"es2020"
],
/* Completeness */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
"baseUrl": ".",
"paths": {
"@components/*": ["src/components/*"],
"@hooks": ["src/hooks/index"],
"@hooks/*": ["src/hooks/*"],
"@actions/*": ["src/action/*"],
"@reducers/*": ["src/reducer/*"],
"@constants/*": ["src/constants/*"],
"@screens/*": ["src/screens/*"],
"@services/*": ["src/services/*"],
"@types/*": ["src/types/*"],
"@common/*": ["src/common/*"],
"@assets/*": ["src/assets/*"],
"@store": ["src/store/store"],
"@utils/*": ["src/utlis/*"],
"@rn-ui-lib/components/*": ["RN-UI-LIB/src/components/*"],
"@rn-ui-lib/icons/*": ["RN-UI-LIB/src/Icons/*"],
"@rn-ui-lib/styles": ["RN-UI-LIB/src/styles/index"],
"@rn-ui-lib/colors": ["RN-UI-LIB/src/styles/colors"],
"@rn-ui-lib/utils/*": ["RN-UI-LIB/src/utlis/*"],
}
},
}