This tutorial is part 2 of 2 in the series.
Here you will learn how to use TypeScript with Babel Module Resolver for aliases that are defined in your .babelrc file:
{..."plugins": [["module-resolver",{"root": ["./"],"alias": {"@components": "./src/components","@constants": "./src/constants",}}],]}
In order to get the same alias mappings to TypeScript, the tsconfig.json file needs to look like this:
{"compilerOptions": {..."baseUrl": ".","paths": {"@components/*": ["./src/components/*"],"@constants/*": ["./src/constants/*"]}},...}
Now you can use import statemes with aliases in your TypeScript files too.