You can configure your Nuxt app to suit your project by adding a nuxt.config.js file (we will call it a Nuxt config file in this book) in the project's root directory. You get this file by default if you use the Nuxt scaffolding tool. You should get the following options (or properties) when you open this file:
// nuxt.config.js
export default {
mode: 'universal',
target: 'server',
head: { ... },
css: [],
plugins: [],
components: true,
buildModules: [],
modules: [],
build: {}
}
Most of them are empty, except mode, target, head, and components. You can customize Nuxt to suit your project specifically through these options. Let's go through each of them, and then the other options, to see what you can use them for.
The mode option
The mode option is used to define the "nature" of your app – whether it is universal or an SPA. Its default value is universal. If you are developing an SPA using Nuxt, then...