-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathnuxt.config.js
executable file
·49 lines (43 loc) · 1.07 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
export default {
head: {
titleTemplate: 'zcom HN | %s',
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'dns-prefetch', href: 'https://api.hackerwebapp.com' },
{ rel: 'preconnect', href: 'https://api.hackerwebapp.com' }
]
},
loading: {
color: '#000'
},
manifest: {
name: 'zcom Hacker News',
short_name: 'zcom HN',
description: 'HackerNews clone built with Nuxt.js',
theme_color: '#2d2d2d',
start_url: '/news'
},
devModules: [
'@nuxtjs/pwa',
'@nuxtjs/axios'
],
axios: {
baseURL: 'https://api.hackerwebapp.com'
},
plugins: [
'~/plugins/filters'
],
render: {
http2: {
push: true
},
static: {
maxAge: '1y',
setHeaders(res, path) {
if (path.includes('sw.js')) {
res.setHeader('Cache-Control', `public, max-age=${15 * 60}`);
}
}
}
}
};