-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
158 lines (153 loc) · 3.85 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
import colors from 'vuetify/es5/util/colors'
require('dotenv').config() // load env for true app configuration (axios and other) FIXME https://github.com/nuxt-community/axios-module/issues/171#issuecomment-542261530
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
titleTemplate: '%s - ' + process.env.npm_package_name,
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: colors.blue.darken2 },
/*
** Global CSS
*/
css: [
'~/assets/page-transition.css',
'~/assets/fonts.css',
'@mdi/font/css/materialdesignicons.css'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
{ src: '~/plugins/vuex-localstorage.js', ssr: false },
{ src: '~plugins/pwa-installer', ssr: false }
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module',
'@nuxtjs/vuetify',
// Doc: https://github.com/nuxt-community/moment-module
'@nuxtjs/moment'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
// Doc: https://auth.nuxtjs.org/
// '@nuxtjs/auth'
'@nuxtjs/auth-next'
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
},
/*
** Auth module configuration
** See https://auth.nuxtjs.org/api/options.html
*/
auth: {
redirect: {
login: '/'
},
strategies: {
laravelPassportPasswordGrant: {
name: 'laravelPassportPassword',
provider: 'laravel/passport',
url: process.env.AUTH_BASE_URL || 'http://food-service.local',
endpoints: {
user: {
url: process.env.AUTH_USER_ENDPOINT || '/api/auth/user'
}
},
token: {
maxAge: 1800
},
refreshToken: {
maxAge: 60 * 60 * 24 * 30
},
clientId: process.env.AUTH_PASSPORT_CLIENT_ID,
clientSecret: process.env.AUTH_PASSPORT_CLIENT_SECRET,
grantType: 'password'
}
}
},
/*
** PWA module configuration
** See https://pwa.nuxtjs.org/
*/
pwa: {
workbox: {
runtimeCaching: [
{
// Should be a regex string. Compiles into new RegExp('https://my-cdn.com/.*')
urlPattern: process.env.API_URL
// Defaults to `networkFirst` if omitted
// handler: 'networkFirst',
// Defaults to `GET` if omitted
// method: 'GET'
},
{
// Should be a regex string. Compiles into new RegExp('https://my-cdn.com/.*')
urlPattern: process.env.API_MEDIA_URL,
// Defaults to `networkFirst` if omitted
handler: 'StaleWhileRevalidate'
// Defaults to `GET` if omitted
// method: 'GET'
}
]
},
manifest: {
name: 'Заказ еды Food Service',
short_name: 'Заказ еды',
description: 'Заказ еды с доставкой',
theme_color: colors.orange.darken1,
lang: 'ru'
}
},
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
vuetify: {
defaultAssets: false,
optionsPath: './vuetify.options.js'
},
moment: {
defaultLocale: 'ru',
locales: ['ru']
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
}
}
}