Modifying the nuxt-config.js
file
The nuxt.config.js
file is the file that contains all of the custom configurations that are needed for the application to run the way you need it to. This file cannot be renamed. In this file, you can add modules, plugins, environment variables, and more. More importantly, the global <head>
of your application lives here.
Open the nuxt.config.js
file in the root of your application. You will see a large object with default properties: head
, loading
, css
, and build
. There are several other properties and configs that the API accepts like, modules
, plugins
, and env
.
If you look at the head
object, you’ll notice that the properties in this object look similar to that of a traditional <head>
in HTML. It’s basically HTML tags converted to objects and their attributes into properties.
nuxt.config.js
head
:
{
title
:
'test-template'
,
meta
:
[
{
charset
:
'utf-8'
},
{
name
:
'viewport'
,
content
:
...