-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
222 lines (191 loc) · 5.46 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
// Target: https://go.nuxtjs.dev/config-target
target: 'static',
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'upasthiti',
htmlAttrs: {
lang: 'en',
},
bodyAttrs: {
class: 'bg-light g-sidebar-show',
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.png' }],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [],
// Router: https://go.nuxtjs.dev/config-router
router: {
middleware: ['isDash', 'isPanel'],
},
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
'~/plugins/mdb.js',
'~/plugins/remixIcons.js',
'~/plugins/vueSelect.js',
'~/plugins/veeValidate.js',
'~/plugins/api.js',
'~/plugins/utils.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: [
// @nuxtjs/google-fonts: https://google-fonts.nuxtjs.org/setup
'@nuxtjs/google-fonts',
// @nuxtjs/moment: https://github.com/nuxt-community/moment-module
'@nuxtjs/moment',
// @nuxtjs/web-vitals: https://github.com/nuxt-community/web-vitals-module
'@nuxtjs/web-vitals',
// nuxt-webpack-optimisations: https://github.com/harlan-zw/nuxt-webpack-optimisations
'nuxt-webpack-optimisations',
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://auth.nuxtjs.org/
'@nuxtjs/auth-next',
// https://github.com/avil13/vue-sweetalert2
'vue-sweetalert2/nuxt/no-css',
// https://gitlab.com/broj42/nuxt-lazy-load#readme
[
'nuxt-lazy-load',
{
images: true,
videos: true,
audios: true,
iframes: true,
native: false,
polyfill: false,
directiveOnly: true,
// To remove class set value to false
loadingClass: 'isLoading',
loadedClass: 'isLoaded',
appendClass: 'lazyLoad',
// Default image must be in the static folder
defaultImage: '/cover.png',
},
],
// nuxt-precompress: https://github.com/frenchrabbit/nuxt-precompress
'nuxt-precompress',
// '@nuxtjs/sitemap': https://sitemap.nuxtjs.org
'@nuxtjs/sitemap',
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
baseURL: '/',
},
// @nuxtjs/google-fonts: https://google-fonts.nuxtjs.org/setup
googleFonts: {
display: 'swap',
download: true,
overwriting: false,
inject: true,
families: {
Poppins: true,
},
},
// https://auth.nuxtjs.org/guide/scheme
auth: {
strategies: {
local: {
scheme: 'refresh',
token: {
property: 'access',
maxAge: 300, // 5 minutes
},
refreshToken: {
property: 'refresh',
data: 'refresh',
maxAge: 86400, // 1 day
},
user: {
property: false,
},
endpoints: {
login: {
url: 'auth/token/',
method: 'post',
},
refresh: {
url: 'auth/token/refresh/',
method: 'post',
},
user: {
url: '/auth/me/',
method: 'get',
},
logout: false,
},
},
},
// redirect: {
// home: '/dash',
// },
},
sweetalert: {
allowOutsideClick: false,
allowEscapeKey: false,
buttonsStyling: false,
scrollbarPadding: false,
customClass: {
confirmButton: 'btn btn-success btn-rounded fw-bolder mx-2',
cancelButton: 'btn btn-danger btn-rounded fw-bolder mx-2',
denyButton: 'btn btn-warning btn-rounded fw-bolder mx-2',
},
},
// @nuxtjs/moment: https://github.com/nuxt-community/moment-module
moment: {
defaultLocale: 'en',
defaultTimezone: 'Asia/Kolkata',
},
webVitals: {
// provider: '', // auto detectd
debug: false,
disabled: false,
},
webpackOptimisations: {
features: {
// enable risky optimisations in dev only
hardSourcePlugin: process.env.NODE_ENV === 'development',
parallelPlugin: process.env.NODE_ENV === 'development',
},
},
sitemap: {
hostname: process.env.BASE_URL,
exclude: ['/dash/**', '/login'],
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
transpile: ['vee-validate/dist/rules'],
},
publicRuntimeConfig: {
axios: {
baseURL: process.env.API_URL,
},
// default User Image
defaultUserImage: process.env.DEFAULT_USER_IMAGE,
// default University Image
defaultUniversityImage: process.env.DEFAULT_UNIVERSITY_IMAGE,
// default College Image
defaultCollegeImage: process.env.DEFAULT_COLLEGE_IMAGE,
// default Student Image
defaultStudentImage: process.env.DEFAULT_STUDENT_IMAGE,
},
// custom loading indicator
loadingIndicator: '~/components/Loaders/loading-indicator.html',
// loading bar
loading: {
color: '#5e72e4',
},
}