TypeScript · Compiler and project settings

paths

Rewrites import paths for the compiler and editor. Your bundler must use the same aliases.

Syntax
"paths": { "@/*": ["./*"] }

Example

Example
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": { "@/*": ["./*"] }
  }
}

More in this group

exactOptionalPropertyTypes include / exclude lib moduleResolution noEmit noUncheckedIndexedAccess skipLibCheck strict

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course