2022-04-06 05:56:08 +00:00
---
2022-10-06 09:15:30 +00:00
title: "nuxt.config.ts"
description: "Nuxt can be easily configured with a single nuxt.config file."
2022-11-21 15:51:39 +00:00
head.title: "nuxt.config.ts"
2023-10-18 10:59:43 +00:00
navigation.icon: i-ph-file-duotone
2022-04-06 05:56:08 +00:00
---
2023-10-18 10:59:43 +00:00
The `nuxt.config` file extension can either be `.js` , `.ts` or `.mjs` .
2022-04-06 05:56:08 +00:00
2024-02-16 20:31:15 +00:00
```ts twoslash [nuxt.config.ts]
2022-09-14 17:26:43 +00:00
export default defineNuxtConfig({
// My Nuxt config
})
```
2024-02-21 17:09:45 +00:00
::tip
2022-09-14 17:26:43 +00:00
`defineNuxtConfig` helper is globally available without import.
::
2022-10-12 09:42:07 +00:00
You can explicitly import `defineNuxtConfig` from `nuxt/config` if you prefer:
2022-09-14 17:26:43 +00:00
2024-02-16 20:31:15 +00:00
```ts twoslash [nuxt.config.ts]
2022-09-14 17:26:43 +00:00
import { defineNuxtConfig } from 'nuxt/config'
2022-04-06 05:56:08 +00:00
export default defineNuxtConfig({
// My Nuxt config
})
```
2023-10-18 10:59:43 +00:00
::read-more{to="/docs/api/configuration/nuxt-config"}
Discover all the available options in the **Nuxt configuration** documentation.
2022-04-06 05:56:08 +00:00
::
2023-10-18 10:59:43 +00:00
To ensure your configuration is up to date, Nuxt will make a full restart when detecting changes in the main configuration file, the [`.env` ](/docs/guide/directory-structure/env ), [`.nuxtignore` ](/docs/guide/directory-structure/nuxtignore ) and `.nuxtrc` dotfiles.
2024-04-12 22:19:47 +00:00
The `.nuxtrc` file can be used to configure Nuxt with a flat syntax. It is based on [`unjs/rc9` ](https://github.com/unjs/rc9 ).
2023-10-18 10:59:43 +00:00
``` [.nuxtrc]
ssr=false
```
2023-10-26 16:00:51 +00:00
If present the properties in `.nuxtrc` file will overwrite the properties in the `nuxt.config` file.