1
0
mirror of https://github.com/nuxt/nuxt.git synced 2025-03-26 10:57:32 +00:00
Nuxt/docs/2.guide/2.directory-structure/2.nuxtrc.md
2025-02-24 17:16:08 +00:00

1.3 KiB

title description head.title navigation.icon
.nuxtrc The .nuxtrc file allows you to define nuxt configurations in a flat syntax. .nuxtrc i-ph-file

The .nuxtrc file can be used to configure Nuxt with a flat syntax. It is based on unjs/rc9.

::tip For more advanced configurations, use nuxt.config. ::

Usage

# Disable SSR
ssr=false

# Configuration for `@nuxt/devtools`
devtools.enabled=true

# Add Nuxt modules
modules[]=@nuxt/image
modules[]=nuxt-security

If present, the properties in the nuxt.config file will overwrite the properties in .nuxtrc file.

::read-more{to="/docs/api/configuration/nuxt-config"} Discover all the available options in the Nuxt configuration documentation. ::

Global .nuxtrc File

You can also create a global .nuxtrc file in your home directory to apply configurations globally.

  • On macOS/Linux, this file is located at:

    ~/.nuxtrc
    
  • On Windows, it is located at:

    C:\Users\{username}\.nuxtrc
    

This global .nuxtrc file allows you to define default settings that apply to all Nuxt projects on your system. However, project-level .nuxtrc files will override these global settings, and nuxt.config will take precedence over both.