2021-10-18 12:48:45 +02:00
|
|
|
const config = require('./server/config.js')
|
2022-02-08 14:45:19 +01:00
|
|
|
const minifyTheme = require('minify-css-string').default
|
2021-10-18 12:48:45 +02:00
|
|
|
|
2022-02-08 22:54:47 +01:00
|
|
|
const isDev = (process.env.NODE_ENV !== 'production')
|
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
|
|
|
],
|
2022-02-08 22:54:47 +01:00
|
|
|
link: [{ rel: 'icon', type: 'image/png', href: '/logo.png' }],
|
|
|
|
script: [{ src: '/gancio-events.es.js', async: true, body: true }],
|
2019-04-03 00:25:12 +02:00
|
|
|
},
|
2022-02-08 22:54:47 +01:00
|
|
|
dev: isDev,
|
2021-10-18 12:48:45 +02:00
|
|
|
server: config.server,
|
2019-04-03 00:25:12 +02:00
|
|
|
|
2021-12-02 10:47:37 +01:00
|
|
|
|
|
|
|
vue: {
|
|
|
|
config: {
|
2022-01-26 09:51:42 +01:00
|
|
|
ignoredElements: ['gancio-events', 'gancio-event']
|
2021-12-02 10:47:37 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-02-08 22:54:47 +01:00
|
|
|
css: ['./assets/style.less'],
|
|
|
|
|
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
|
|
|
*/
|
2022-05-03 12:09:06 +02:00
|
|
|
loading: { color: 'orangered', height: '3px' },
|
2019-06-21 23:52:18 +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.
|
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
|
|
|
|
2021-10-29 13:04:11 +02:00
|
|
|
serverMiddleware: ['server/routes'],
|
|
|
|
|
2019-04-03 00:25:12 +02:00
|
|
|
/*
|
|
|
|
** Axios module configuration
|
2019-06-21 23:52:18 +02:00
|
|
|
* 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
|
|
|
},
|
2019-09-17 16:05:46 +02:00
|
|
|
tokenRequired: true,
|
2019-07-23 01:31:43 +02:00
|
|
|
tokenType: 'Bearer'
|
2019-04-26 23:14:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-02-08 14:45:19 +01:00
|
|
|
buildModules: ['@nuxtjs/vuetify'],
|
|
|
|
vuetify: {
|
|
|
|
customVariables: ['~/assets/variables.scss'],
|
|
|
|
treeShake: true,
|
|
|
|
theme: {
|
|
|
|
options: {
|
|
|
|
customProperties: false,
|
|
|
|
variations: false,
|
|
|
|
minifyTheme,
|
|
|
|
},
|
|
|
|
dark: true,
|
|
|
|
themes: {
|
|
|
|
dark: {
|
|
|
|
primary: '#FF6E40'
|
|
|
|
},
|
|
|
|
light: {
|
|
|
|
primary: '#FF4500'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-02-08 22:54:47 +01:00
|
|
|
defaultAssets: false
|
2022-02-09 00:46:42 +01:00
|
|
|
},
|
2021-10-29 13:13:44 +02:00
|
|
|
build: {
|
|
|
|
corejs: 3,
|
|
|
|
cache: true,
|
2022-02-09 00:46:42 +01:00
|
|
|
hardSource: !isDev,
|
|
|
|
extractCSS: !isDev,
|
|
|
|
optimizeCSS: !isDev
|
2020-07-25 21:41:22 +02:00
|
|
|
},
|
2019-04-03 00:25:12 +02:00
|
|
|
}
|