From 3f9549d320ea3d40286fb0abcec9a3f31d2a658b Mon Sep 17 00:00:00 2001 From: Rajarshee Chatterjee Date: Tue, 16 Aug 2022 13:03:29 +0530 Subject: [PATCH] fix: Path Aliases --- babel.config.js | 7 +++++-- tsconfig.json | 14 ++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/babel.config.js b/babel.config.js index 97849f99..33f91c3f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -6,15 +6,18 @@ module.exports = function (api) { [ 'module-resolver', { - root: ['./src'], alias: { '@components': './src/components', + '@database': './src/database', '@hooks': './src/hooks', '@screens': './src/screens', '@strings': './strings', '@redux': './src/redux', + '@services': './src/services', + '@sources': './src/sources', + '@utils': './src/utils', + '@theme': './src/theme', }, - extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'], }, ], ], diff --git a/tsconfig.json b/tsconfig.json index 64e82211..b4decd35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,14 +14,16 @@ "noUnusedLocals": true, "resolveJsonModule": true, "paths": { - "@components/*": ["./src/components/*"], - "@hooks/*": ["./src/hooks/*"], - "@screens/*": ["./src/screens/*"], - "@strings/*": ["./strings/*"], - "@redux/*": ["./src/redux/*"] + "@components": ["src/components/index"], + "@components/*": ["src/components/*"], + "@database/*": ["src/database/*"], + "@hooks/*": ["src/hooks/*"], + "@screens/*": ["src/screens/*"], + "@strings/*": ["strings/*"], + "@redux/*": ["src/redux/*"], + "@theme/*": ["src/theme/*"] } }, - "include": ["src/"], "exclude": [ "node_modules", "babel.config.js",