TypeScript · Modules

baseUrl

Specify the base directory to resolve non-relative module names.

Syntax
"baseUrl": "value"

Example

Example
{
  "compilerOptions": {
    "baseUrl": "value"
  }
}

More in this group

allowArbitraryExtensions allowImportingTsExtensions allowUmdGlobalAccess customConditions module moduleSuffixes noResolve noUncheckedSideEffectImports

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