110 lines
1.9 KiB
JavaScript
110 lines
1.9 KiB
JavaScript
import pkg from './package'
|
|
|
|
export default {
|
|
mode: 'spa',
|
|
|
|
/*
|
|
** Headers of the page
|
|
*/
|
|
head: {
|
|
title: pkg.name,
|
|
htmlAttrs: {
|
|
lang: 'en-US'
|
|
},
|
|
meta: [
|
|
{ charset: 'utf-8' },
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
{ hid: 'description', name: 'description', content: pkg.description }
|
|
],
|
|
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }]
|
|
},
|
|
|
|
proxy: {
|
|
'/api': { target: 'http://localhost:3000', pathRewrite: { '/api/': '/' } }
|
|
},
|
|
|
|
router: {
|
|
middleware: ['auth']
|
|
},
|
|
|
|
server: {
|
|
port: 3100
|
|
},
|
|
|
|
auth: {
|
|
strategies: {
|
|
local: {
|
|
endpoints: {
|
|
login: { url: '/api/auth/login', method: 'post', propertyName: 'accessToken' },
|
|
logout: { url: '/api/auth/logout', method: 'post' },
|
|
user: false
|
|
},
|
|
tokenRequired: true,
|
|
tokenType: 'Bearer'
|
|
}
|
|
},
|
|
|
|
redirect: {
|
|
login: '/login',
|
|
logout: '/',
|
|
home: '/admin'
|
|
}
|
|
},
|
|
|
|
/*
|
|
** Customize the progress-bar color
|
|
*/
|
|
loading: { color: '#fff' },
|
|
|
|
/*
|
|
** Global CSS
|
|
*/
|
|
css: [
|
|
'@/assets/css/base.scss'
|
|
],
|
|
|
|
/*
|
|
** Plugins to load before mounting the App
|
|
*/
|
|
plugins: [
|
|
'@/plugins/font-awesome.js',
|
|
'@/plugins/fab.js'
|
|
],
|
|
|
|
/*
|
|
** Nuxt.js modules
|
|
*/
|
|
modules: [
|
|
'@nuxtjs/auth',
|
|
'@nuxtjs/proxy',
|
|
'@nuxtjs/axios',
|
|
'bootstrap-vue/nuxt'
|
|
],
|
|
/*
|
|
** Axios module configuration
|
|
*/
|
|
axios: {
|
|
// See https://github.com/nuxt-community/axios-module#options
|
|
},
|
|
|
|
/*
|
|
** Build configuration
|
|
*/
|
|
build: {
|
|
/*
|
|
** You can extend webpack config here
|
|
*/
|
|
extend(config, ctx) {
|
|
// Run ESLint on save
|
|
if (ctx.isDev && ctx.isClient) {
|
|
config.module.rules.push({
|
|
enforce: 'pre',
|
|
test: /\.(js|vue)$/,
|
|
loader: 'eslint-loader',
|
|
exclude: /(node_modules)/
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|