Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion packages/tsconfig-reference/copy/en/options/extends.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ display: "Extends"
oneline: "Specify one or more path or node module references to base configuration files from which settings are inherited."
---

The value of `extends` is a string which contains a path to another configuration file to inherit from.
The value of `extends` is a string or list of strings which contains a path to another configuration file to inherit from.
The path may use Node.js style resolution.

The configuration from the base file are loaded first, then overridden by those in the inheriting config file. All relative paths found in the configuration file will be resolved relative to the configuration file they originated in.
Expand All @@ -26,6 +26,16 @@ Currently, the only top-level property that is excluded from inheritance is [`re
}
```

`configs/withJson.json`:

```json tsconfig
{
"compilerOptions": {
"resolveJsonModule": true
}
}
```

`tsconfig.json`:

```json tsconfig
Expand All @@ -35,6 +45,15 @@ Currently, the only top-level property that is excluded from inheritance is [`re
}
```

`tsconfig.custom.json`:

```json tsconfig
{
"extends": ["./configs/base", "./configs/withJson.json"],
"files": ["main.ts", "package.json"]
}
```

`tsconfig.nostrictnull.json`:

```json tsconfig
Expand Down