Created
March 22, 2021 18:52
-
-
Save kerren/d8ba057dfc1d22390c54d818e61781a9 to your computer and use it in GitHub Desktop.
[TSConfig Paths Import Example] How to use these paths in code #tsconfig #paths #typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before the "@config" path | |
import * as config from '../../config'; | |
import { Config } from '../../config'; | |
// After the "@config" path | |
import * as config from '@config'; | |
import { Config } from '@config'; | |
// Before the "@logger" path | |
import { LoggerService } from '../../shared/logger/logger.service'; | |
// After the "@logger" path | |
import { LoggerService } from '@logger'; | |
// Before the "@modules" path | |
import { SharedModule } from '../../../modules/shared/shared.module'; | |
// After the "@modules" path | |
import { SharedModule } from '@modules/shared/shared.module'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment