Last active
January 8, 2020 10:04
-
-
Save guilhermebkel/df9af08823ef54d92b2f98dd08aa0c7b to your computer and use it in GitHub Desktop.
different-path-alias-for-typescript-dev-and-prod
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
// Usually the file you use to start your application | |
// ... | |
import "module-alias/register" | |
import "tsconfig-paths/register" | |
// ... |
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
{ | |
// ... | |
// Your aliases for production | |
"_moduleAliases": { | |
// ... | |
"~": "./dist/apps" | |
// ... | |
} | |
// ... | |
} |
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
Show hidden characters
{ | |
"compilerOptions": { | |
// ... | |
"rootDir": ".", | |
"outDir": "dist", | |
"baseUrl": ".", | |
// Your aliases for development | |
"paths": { | |
"~/*": ["./src/*"] | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment