/
nuxt.config.js
138 lines (126 loc) · 4.31 KB
/
nuxt.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
const description = 'Catálogo de Grupos da USP'
const title = 'GRUSP'
const siteLang = 'pt'
const siteName = 'GRUSP'
const siteUrl = 'https://grusp.site'
const siteImg =
'/561df5ce8e2a622b784ac7244752ce9c52dec727a4f9fd5021396d4fbb681904.png'
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: siteName,
htmlAttrs: {
lang: siteLang,
},
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{ hid: 'description', name: 'description', content: description },
{ name: 'format-detection', content: 'telephone=no' },
{ name: 'description', content: description },
{ name: 'image', content: siteImg },
{ name: 'locale', content: 'pt' },
{ name: 'robots', content: 'index, follow' },
{ name: 'site_name', content: siteName },
{ name: 'twitter:card', content: 'Large' },
{ name: 'twitter:description', content: description },
{ name: 'twitter:image', content: siteImg },
{ name: 'twitter:title', content: title },
{ name: 'url', content: siteUrl },
{ property: 'og:description', content: description },
{ property: 'og:image', content: siteImg },
{ property: 'og:locale', content: 'pt_BR' },
{ property: 'og:site_name', content: siteName },
{ property: 'og:title', content: title },
{ property: 'og:url', content: siteUrl },
],
link: [
{
rel: 'icon',
type: 'image/png',
href: '/favicon-16x16.png',
sizes: '16x16',
},
{
rel: 'icon',
type: 'image/png',
href: '/favicon-32x32.png',
sizes: '32x32',
},
{
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png',
sizes: '180x180',
},
{ rel: 'manifest', href: '/site.webmanifest' },
{ rel: 'image_src', href: siteImg },
{ rel: 'canonical', href: siteUrl },
],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
// Ficheiro CSS dentro do projeto
'~/assets/css/main.css',
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ['~/plugins/vue-multiselect.js', '~/plugins/vue-anka-cropper.js'],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [],
// Modules: https://go.nuxtjs.dev/config-modules
modules: ['@nuxtjs/axios', '@nuxtjs/auth-next', 'bootstrap-vue/nuxt'],
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
optimizeCSS: true,
extractCSS: true,
},
// MODULES
axios: {
credentials: true,
// Axios interceptor to add the bearer token to requests
interceptors: {
request: config => {
const token = $auth.strategy.token.get()
if (token) {
config.headers.common['Authorization'] = `Bearer ${token}`
}
return config
},
},
},
auth: {
strategies: {
local: {
provider: 'local',
endpoints: {
login: { url: '/auth/login', method: 'post' },
logout: { url: '/auth/logout', method: 'post' },
user: { url: '/account/profile', method: 'get' },
},
token: {
property: 'token',
type: 'Bearer',
required: true,
},
user: {
property: false,
autoFetch: false,
},
},
},
redirect: {
login: '/conta/entrar',
logout: '/conta/entrar',
home: '/perfil',
},
},
bootstrapVue: {
icons: true,
},
// telemetry
telemetry: false,
}