Skip to content

Guide

Start a new project with the template

sh
$ npx deegit https://git.weconstudio.it/we/nuxt-template.git <project-name>

or add it to an existing project

sh
$ yarn add https://git.weconstudio.it/we/nuxt.git

Add @we/nuxt to modules section of nuxt.config.js

js
{
  modules: [
    '@we/nuxt'
  ],
  we: {
    host: 'my-app.localhost',

    // api config
    api: {
      baseUrl: process.env.BASE_URL,
      endpoints: [
        'https://api.test.com',
        'https://staging.api.test.com'
      ],
      apiSuffix: '/api'
    },

    // vuex-persist config
    persist: {
      paths: [],
    },

    // notify config
    notify: {
      success: {
        icon: 'mdi-check-circle',
      },
    },
  }
}

INFO

You can find more information for each module in the corresponding section