Configuration

By default, Nuxt.js is configured to cover most use cases. This default configuration can be overwritten by modifying the nuxt.config.js file.

build

This option lets you add modules inside the vendor.bundle.js file to reduce the size of the application bundle. This is especially helpful when using external modules.

Documentation about build integration

css

This option lets you define the CSS files/modules/libraries you want to set as globals (included in every page).

Documentation about css integration

dev

This option lets you define the development or production mode of Nuxt.js

Documentation about dev integration

env

This option lets you define environment variables available to both the client and the server.

Documentation about env integration

generate

This option lets you define parameters values for every dynamic route in your application that will be transformed into HTML files by Nuxt.js.

Documentation about generate integration

This option lets you define all default meta tags for your application.

Documentation about head integration

loading

This option lets you customize the loading component Nuxt.js loads by default.

Documentation about loading integration

modules

This option lets you add Nuxt modules to your project.

Documentation about modules integration

modulesDir

This option lets you define the node_modules folder of your Nuxt.js Application.

Documentation about modulesDir integration

plugins

This option lets you define JavaScript plugins to be run before instantiating the root Vue.js Application.

Documentation about plugins integration

rootDir

This option lets you define the workspace of your Nuxt.js Application.

Documentation about rootDir integration

server

This option lets you configure the connection variables for the server instance of your Nuxt.js Application.

Documentation about server integration

router

This option lets you overwrite the default Nuxt.js configuration of Vue Router.

Documentation about router integration

srcDir

This option lets you define the source directory of your Nuxt.js Application.

Documentation about srcDir integration

transition

This option lets you define the default properties of the page transitions.

Documentation about transition integration

Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!