Skip to content

Instantly share code, notes, and snippets.

@aslam
Created August 26, 2017 22:37
Show Gist options
  • Save aslam/35302868dbc9ab75ad6deae7e89f53cf to your computer and use it in GitHub Desktop.
Save aslam/35302868dbc9ab75ad6deae7e89f53cf to your computer and use it in GitHub Desktop.

Revisions

  1. aslam created this gist Aug 26, 2017.
    58 changes: 58 additions & 0 deletions nuxt.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    module.exports = {
    /*
    ** Router config
    */
    router: {
    middleware: ['namespace', 'check-auth']
    },
    /*
    ** Headers of the page
    */
    head: {
    title: 'Web',
    meta: [
    { charset: 'utf-8' },
    { name: 'viewport', content: 'width=device-width, initial-scale=1' },
    { hid: 'description', name: 'description', content: 'Nuxt.js project' }
    ],
    link: [
    { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
    { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' }
    ]
    },
    /*
    ** Customize the progress-bar color
    */
    loading: { color: '#3B8070' },
    /*
    ** Build configuration
    */
    build: {
    vendor: ['vuetify', 'vuelidate']
    },
    modules: [
    '@nuxtjs/pwa',
    '@nuxtjs/component-cache',
    ['@nuxtjs/axios', {
    baseURL: 'https://now-staging.hl.com/',
    credentials: false,
    requestInterceptor: function _reqInterceptor (config, { store }) {
    if (store.getters.accessToken) {
    config.headers.common['Authorization'] = 'Bearer ' + store.getters.accessToken
    }

    return config
    }
    }]
    ],
    plugins: [
    '~plugins/vuex-router-sync.js',
    '~plugins/vuetify.js',
    '~plugins/vuelidate.js',
    '~plugins/firebaseConfig.js'
    ],
    css: [
    { src: '~assets/style/app.styl', lang: 'styl' },
    { src: '~assets/style/typography.scss', lang: 'scss' }
    ]
    }