2020-06-22 17:13:42 +08:00
|
|
|
import appConfig from './config/app.config'
|
|
|
|
import apiConfig from './config/api.config'
|
|
|
|
import { isProdMode, isDevMode } from './environment'
|
|
|
|
|
2020-06-19 17:10:44 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
/*
|
|
|
|
** Nuxt rendering mode
|
|
|
|
** See https://nuxtjs.org/api/configuration-mode
|
|
|
|
*/
|
|
|
|
mode: 'universal',
|
|
|
|
/*
|
2020-06-21 21:56:34 +08:00
|
|
|
** Render configuration
|
|
|
|
*/
|
|
|
|
render: {
|
|
|
|
csp: true
|
|
|
|
},
|
2020-06-22 17:13:42 +08:00
|
|
|
modern: true,
|
|
|
|
dev: isDevMode,
|
2020-06-21 21:56:34 +08:00
|
|
|
env: {
|
2020-06-22 17:13:42 +08:00
|
|
|
BASE: apiConfig.BASE,
|
|
|
|
HOST_URL: apiConfig.SOCKET
|
|
|
|
},
|
|
|
|
cache: {
|
|
|
|
max: 100,
|
|
|
|
maxAge: 1000 * 60 * 15
|
2020-06-21 21:56:34 +08:00
|
|
|
},
|
|
|
|
/*
|
2020-06-19 17:10:44 +08:00
|
|
|
** Headers of the page
|
|
|
|
** See https://nuxtjs.org/api/configuration-head
|
|
|
|
*/
|
|
|
|
head: {
|
2020-06-22 17:13:42 +08:00
|
|
|
title: appConfig.meta.title,
|
2020-06-19 17:10:44 +08:00
|
|
|
meta: [
|
|
|
|
{ charset: 'utf-8' },
|
|
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
2020-06-22 17:13:42 +08:00
|
|
|
{ hid: 'keywords', name: 'keywords', content: appConfig.meta.keywords },
|
|
|
|
{ hid: 'description', name: 'description', content: appConfig.meta.description }
|
2020-06-19 17:10:44 +08:00
|
|
|
],
|
|
|
|
link: [
|
|
|
|
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
/*
|
|
|
|
** Global CSS
|
|
|
|
*/
|
|
|
|
css: [
|
|
|
|
'element-ui/lib/theme-chalk/index.css'
|
|
|
|
],
|
|
|
|
/*
|
|
|
|
** Plugins to load before mounting the App
|
|
|
|
** https://nuxtjs.org/guide/plugins
|
|
|
|
*/
|
|
|
|
plugins: [
|
|
|
|
'@/plugins/element-ui',
|
2020-06-21 21:56:34 +08:00
|
|
|
// '@/plugins/axios'
|
2020-06-19 17:10:44 +08:00
|
|
|
],
|
|
|
|
/*
|
|
|
|
** Nuxt.js dev-modules
|
|
|
|
*/
|
|
|
|
buildModules: [
|
|
|
|
],
|
|
|
|
/*
|
|
|
|
** Nuxt.js modules
|
|
|
|
*/
|
|
|
|
modules: [
|
2020-06-22 17:13:42 +08:00
|
|
|
['@nuxtjs/axios', { baseURL: apiConfig.BASE }]
|
2020-06-19 17:10:44 +08:00
|
|
|
],
|
|
|
|
/*
|
|
|
|
** Build configuration
|
|
|
|
** See https://nuxtjs.org/api/configuration-build/
|
|
|
|
*/
|
|
|
|
build: {
|
|
|
|
transpile: [/^element-ui/],
|
|
|
|
}
|
|
|
|
}
|