2022-04-06 05:56:08 +00:00
---
2022-10-06 09:15:30 +00:00
navigation.icon: IconFile
title: "nuxt.config.ts"
description: "Nuxt can be easily configured with a single nuxt.config file."
head.title: "Nuxt Configuration File"
2022-04-06 05:56:08 +00:00
---
2022-10-06 09:15:30 +00:00
# Nuxt Config File
2022-04-06 05:56:08 +00:00
Nuxt can be easily configured with a single `nuxt.config` file, which can have either a `.js` , `.ts` or `.mjs` extension.
```ts
2022-09-14 17:26:43 +00:00
export default defineNuxtConfig({
// My Nuxt config
})
```
::alert
`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
```js
import { defineNuxtConfig } from 'nuxt/config'
2022-04-06 05:56:08 +00:00
export default defineNuxtConfig({
// My Nuxt config
})
```
2022-08-13 07:27:04 +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` , `.nuxtignore` and `.nuxtrc` dotfiles.
2022-04-15 08:10:05 +00:00
2022-11-16 10:04:28 +00:00
::ReadMore{link="/docs/api/configuration/nuxt-config"}
2022-04-06 05:56:08 +00:00
::