November 2019
Beginner
804 pages
20h 1m
English
Our imports already look much better because we have created barrels, which remove the need for knowing the exact filenames. However, our imports still need to indicate the relative paths to the packages that we want to import symbols from.
This is far from ideal because as your applications grow in complexity, your paths will be longer and longer and you might end up with imports like this: import { foo } from '../../../../../services';.
A good IDE will go a long way to diminish the annoyance, but it will still have an impact on readability and refactoring. Fortunately, we can improve the situation by adapting the compiler's configuration.
In tsconfig.json, we can configure the paths option in order to ...
Read now
Unlock full access