Go to definition in VSC not working with paths defined with .babelrc file

Bug Report

Current Behavior
I have created the file .babelrc in the root of my React native project and install all related node_modules related to that. Go to definition with VSC with any of these paths not working. I have provided example below in the file with the supported attached png.

import { getMediaAll } from 'actions/categories';

Expected behavior/code
When I import any variable with the file path defined with the below parameters it should to go the definition with VSC.

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

  • Filename: .babelrc
{
    "plugins": [
        [
            "module-resolver",
            {
                "root": ["./src"],
                "extensions": [".js", ".ios.js", ".android.js"],
                "alias": {
                    "assets": "./src/assets",
                    "components": "./src/components",
                    "config": "./src/config",
                    "navigation": "./src/navigation",
                    "atoms": "./src/atoms",
                    "actions": "./src/redux/actions",
                    "reducers": "./src/redux/reducers",
                    "screens": "./src/screens",
                    "services": "./src/services",
                    "theme": "./src/theme"
                }
            }
        ]
    ]
}

Environment

  System:
    OS: macOS 10.15.1
  Binaries:
    Node: 10.16.3 - /usr/local/bin/node
    npm: 6.11.3 - ~/.npm-packages/bin/npm
  npmPackages:
    babel: ^6.23.0 => 6.23.0 
    babel-plugin-module-alias: ^1.6.0 => 1.6.0 
    babel-plugin-module-resolver: ^3.2.0 => 3.2.0 
    babel-plugin-transform-remove-console: 6.9.4 => 6.9.4 
    babel-preset-expo: ^8.0.0 => 8.0.0 
    react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4 

Github-Babelrc

1 possible answer(s) on “Go to definition in VSC not working with paths defined with .babelrc file