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
|
|
|
],
|
2021-07-28 10:02:04 +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-03-16 18:34:14 +01:00
|
|
|
'@/assets/style.less',
|
|
|
|
'@mdi/font/css/materialdesignicons.css'
|
2020-07-31 01:03:19 +02:00
|
|
|
],
|
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.
|
|
|
|
'@/plugins/vue-clipboard', // 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
|
|
|
|
|
|
|
render: {
|
2020-01-15 23:13:43 +01:00
|
|
|
compressor: false,
|
|
|
|
bundleRenderer: {
|
|
|
|
shouldPreload: (file, type) => {
|
|
|
|
return ['script', 'style', 'font'].includes(type)
|
|
|
|
}
|
|
|
|
}
|
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-06-04 15:35:55 +02:00
|
|
|
'./@nuxtjs/axios',
|
|
|
|
'./@nuxtjs/auth',
|
2021-03-05 14:20:45 +01:00
|
|
|
['nuxt-express-module', { expressPath: 'server/', routesPath: 'server/routes' }]
|
2019-04-03 00:25:12 +02:00
|
|
|
],
|
2021-02-09 12:17:39 +01:00
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-04-30 15:16:50 +02:00
|
|
|
|
2020-07-25 21:41:22 +02:00
|
|
|
buildModules: [
|
2021-10-19 16:36:51 +02:00
|
|
|
'nuxt-build-optimisations',
|
2020-07-25 21:41:22 +02:00
|
|
|
'@nuxtjs/vuetify'
|
|
|
|
],
|
|
|
|
vuetify: {
|
2020-07-31 01:03:19 +02:00
|
|
|
defaultAssets: false,
|
2021-06-04 15:35:55 +02:00
|
|
|
optionsPath: './vuetify.options.js',
|
|
|
|
treeShake: true
|
2020-07-25 21:41:22 +02:00
|
|
|
/* module options */
|
|
|
|
},
|
2021-06-04 15:35:55 +02:00
|
|
|
|
2019-04-03 00:25:12 +02:00
|
|
|
}
|