gancio-upstream/nuxt.config.js

96 lines
2.2 KiB
JavaScript
Raw Normal View History

2021-10-18 12:48:45 +02:00
const config = require('./server/config.js')
2019-04-03 00:25:12 +02:00
module.exports = {
2020-06-24 15:26:52 +02:00
telemetry: false,
2021-02-09 12:17:39 +01:00
modern: (process.env.NODE_ENV === 'production') && 'client',
2019-04-03 00:25:12 +02:00
/*
** Headers of the page
*/
head: {
meta: [
{ charset: 'utf-8' },
2019-09-11 19:12:24 +02:00
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
2019-04-03 00:25:12 +02:00
],
link: [{ rel: 'icon', type: 'image/png', href: '/logo.png' }]
2019-04-03 00:25:12 +02:00
},
2019-06-06 23:54:32 +02:00
dev: (process.env.NODE_ENV !== 'production'),
2021-10-18 12:48:45 +02:00
server: config.server,
2019-04-03 00:25:12 +02:00
/*
2021-10-18 12:48:45 +02:00
** Customize the progress-bar component
2019-04-03 00:25:12 +02:00
*/
2021-03-05 14:20:45 +01:00
loading: '~/components/Loading.vue',
2019-04-03 00:25:12 +02:00
/*
** Global CSS
*/
2020-07-31 01:03:19 +02:00
css: [
2021-11-08 10:59:47 +01:00
'vuetify/dist/vuetify.min.css',
'@mdi/font/css/materialdesignicons.css',
'@/assets/style.less'
2020-07-31 01:03:19 +02:00
],
2019-04-03 00:25:12 +02:00
/*
** Plugins to load before mounting the App
*/
2019-05-30 12:04:14 +02:00
plugins: [
2020-02-20 18:37:10 +01:00
'@/plugins/i18n.js',
2020-07-25 21:41:22 +02:00
'@/plugins/filters', // text filters, datetime filters, generic transformation helpers etc.
'@/plugins/vuetify', // vuetify
2019-06-25 01:05:38 +02:00
'@/plugins/axios', // axios baseurl configuration
2020-09-05 01:21:47 +02:00
'@/plugins/validators', // inject validators
2020-12-04 17:29:43 +01:00
'@/plugins/api', // api helpers
{ src: '@/plugins/v-calendar', ssr: false } // v-calendar
2019-05-30 12:04:14 +02:00
],
2019-11-13 17:57:37 +01:00
2019-04-03 00:25:12 +02:00
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
2021-10-21 20:49:49 +02:00
'@nuxtjs/axios',
'@nuxtjs/auth',
'@/server/initialize.server.js'
2019-04-03 00:25:12 +02:00
],
2021-02-09 12:17:39 +01:00
serverMiddleware: ['server/routes'],
2019-04-03 00:25:12 +02:00
/*
** Axios module configuration
* See https://github.com/nuxt-community/axios-module#options
2019-04-03 00:25:12 +02:00
*/
axios: {
2019-06-07 17:02:33 +02:00
prefix: '/api'
2019-04-03 00:25:12 +02:00
},
2019-04-26 23:14:43 +02:00
auth: {
2020-01-27 00:47:03 +01:00
// localStorage: false, // https://github.com/nuxt-community/auth-module/issues/425
cookie: {
prefix: 'auth.',
2020-02-01 22:39:31 +01:00
options: {
maxAge: 60 * 60 * 24 * 30 * 12 * 5
}
2020-01-27 00:47:03 +01:00
},
2019-04-26 23:14:43 +02:00
strategies: {
local: {
endpoints: {
2020-01-27 00:47:03 +01:00
login: {
url: '../oauth/login',
method: 'post',
propertyName: 'access_token',
withCredentials: true,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
},
2019-05-30 12:04:14 +02:00
logout: false,
2020-01-27 00:47:03 +01:00
user: { url: '/user', method: 'get', propertyName: false }
2019-07-23 01:31:43 +02:00
},
tokenRequired: true,
2019-07-23 01:31:43 +02:00
tokenType: 'Bearer'
2019-04-26 23:14:43 +02:00
}
}
},
build: {
corejs: 3,
cache: true,
hardSource: true
2020-07-25 21:41:22 +02:00
},
2019-04-03 00:25:12 +02:00
}