This commit is contained in:
lesion
2019-05-30 12:04:14 +02:00
parent 69792b518e
commit 6099d538c0
47 changed files with 1220 additions and 998 deletions

View File

@@ -1,4 +1,4 @@
const pkg = require('./package')
const { SHARED_CONF } = require('./config')
module.exports = {
mode: 'universal',
@@ -7,11 +7,11 @@ module.exports = {
** Headers of the page
*/
head: {
title: pkg.name,
title: SHARED_CONF.title,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
{ hid: 'description', name: 'description', content: SHARED_CONF.description }
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
@@ -23,27 +23,26 @@ module.exports = {
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
// loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'element-ui/lib/theme-chalk/index.css',
'bootstrap/dist/css/bootstrap.css',
'bootstrap-vue/dist/bootstrap-vue.css',
'v-calendar/lib/v-calendar.min.css'
'element-ui/lib/theme-chalk/index.css',
],
/*
** Plugins to load before mounting the App
*/
plugins: ['@/plugins/element-ui', '@/plugins/filters',
'@/plugins/i18n', '@/plugins/bootstrap-vue',
'@/plugins/vue-awesome',
{ src: '@/plugins/v-calendar', ssr: false },
{ src: '@/plugins/vuex-persist.js', ssr: false },
'@/plugins/magic-grid'],
plugins: [
'@/plugins/element-ui', // UI library -> https://element.eleme.io/#/en-US/
'@/plugins/filters', // text filters, datetime, etc.
'@/plugins/i18n', // localization plugin
'@/plugins/vue-awesome', // icon
{ src: '@/plugins/v-calendar', ssr: false }, // calendar, TO-REDO
'@/plugins/initialize'
],
/*
** Nuxt.js modules
@@ -57,18 +56,18 @@ module.exports = {
** Axios module configuration
*/
axios: {
baseURL: '',
baseURL: SHARED_CONF.baseurl + '/api',
browserBaseURL: SHARED_CONF.baseurl + '/api',
prefix: '/api',
credentials: true
// credentials: true
// See https://github.com/nuxt-community/axios-module#options
},
auth: {
strategies: {
local: {
endpoints: {
login: { url: '/auth/login', method: 'post', propertyName: 'token' },
logout: { url: '/auth/logout', method: 'post' },
logout: false,
user: { url: '/auth/user', method: 'get', propertyName: false }
},
}
@@ -80,12 +79,14 @@ module.exports = {
** Build configuration
*/
build: {
transpile: [/^element-ui/, /^vue-awesome/, /^vue-magic-grid/, /^vuex-persist/],
transpile: [/^element-ui/, /^vue-awesome/],
splitChunks: {
layouts: true
}
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// extend(config, ctx) {
// Run ESLint on save
// if (ctx.isDev && ctx.isClient) {
// config.module.rules.push({
@@ -95,6 +96,6 @@ module.exports = {
// exclude: /(node_modules)/
// })
// }
}
// }
}
}