mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
f26a801775
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
25 lines
1.0 KiB
Markdown
25 lines
1.0 KiB
Markdown
---
|
|
title: "tsconfig.json"
|
|
description: "Nuxt generates a .nuxt/tsconfig.json file with sensible defaults and your aliases."
|
|
head.title: "tsconfig.json"
|
|
navigation.icon: i-ph-file-duotone
|
|
---
|
|
|
|
Nuxt [automatically generates](/docs/guide/concepts/typescript) a `.nuxt/tsconfig.json` file with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults.
|
|
|
|
You can benefit from this by creating a `tsconfig.json` in the root of your project with the following content:
|
|
|
|
```json [tsconfig.json]
|
|
{
|
|
"extends": "./.nuxt/tsconfig.json"
|
|
}
|
|
```
|
|
|
|
::callout
|
|
As you need to, you can customize the contents of this file. However, it is recommended that you don't overwrite `target`, `module` and `moduleResolution`.
|
|
::
|
|
|
|
::callout
|
|
If you need to customize your `paths`, this will override the auto-generated path aliases. Instead, we recommend that you add any path aliases you need to the [`alias`](/docs/api/nuxt-config#alias) property within your `nuxt.config`, where they will get picked up and added to the auto-generated `tsconfig`.
|
|
::
|