-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
executable file
·83 lines (78 loc) · 1.71 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
export default {
router: {
middleware: ['auth']
},
head: {
titleTemplate: 'Neon | %s',
meta: [
{ property: 'og:image', content: 'https://user-images.githubusercontent.com/904724/26879447-689b56a8-4b91-11e7-968f-5eea1d6c71b4.png' },
{ property: 'twitter:card', content: 'summary_large_image' },
{ property: 'twitter:site', content: '@nuxt_js' }
],
link: [
{ rel: 'icon', type: 'image/svg', href: '/logo.svg' },
{ rel: 'dns-prefetch', href: 'https://api.hnpwa.com' },
{ rel: 'preconnect', href: 'https://api.hnpwa.com' }
]
},
css: [
// SCSS file in the project
'@/assets/style/main.scss'
],
loading: {
color: '#59cc93'
},
manifest: {
name: 'Communication freely',
short_name: 'Neon',
description: 'HackerNews clone built with Nuxt.js',
theme_color: '#188269',
start_url: '/news?stand_alone=1'
},
modules: [
'~/modules',
'cookie-universal-nuxt',
['nuxt-i18n', {
locales: [
{
code: 'en',
iso: 'en-US',
name: 'English',
file: 'en-US.js'
},
{
code: 'ru',
iso: 'ru-RU',
name: 'Русский',
file: 'ru-RU.js'
},
],
defaultLocale: 'en',
lazy: true,
langDir: 'lang/'
}]
],
axios: {
baseURL: '/api/v1/'
},
proxy: [
'http://localhost:80/api/v1'
],
plugins: [
'~/plugins/filters',
'~/plugins/axios'
],
render: {
http2: {
push: true
},
static: {
maxAge: '1y',
setHeaders(res, path) {
if (path.includes('sw.js')) {
res.setHeader('Cache-Control', `public, max-age=${15 * 60}`)
}
}
}
}
}