Use `baseUrl` and `paths` for ergonomic imports.
Section: tsconfig Basics
Configure path aliases
json
json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
}
}Explanation
`paths` is useful for app code, but make sure your bundler or runtime understands the aliases too.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing tsconfig Basics