2022-04-06 05:56:08 +00:00
---
icon: IconFile
title: nuxt.config.ts
2022-08-13 07:27:04 +00:00
head.title: Nuxt Configuration file
2022-04-06 05:56:08 +00:00
---
2022-08-13 07:27:04 +00:00
# Nuxt Configuration 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.
::
You can explicitily import `defineNuxtConfig` from `nuxt/config` if you prefer:
```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-04-06 05:56:08 +00:00
::ReadMore{link="/api/configuration/nuxt.config"}
::