-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnuxt.config.js
68 lines (64 loc) · 1.98 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
const { URL } = require('url')
const title = 'GAMEBOY SELFIE ☻'
const BASE_URL = 'https://gameboy.guy.is/'
const description = 'Tap to snap!'
const imagePath = '/GAMEBOY_CAMERA_2019-04-30T17_29_12.png'
module.exports = () => ({
mode: 'universal',
render: {
fallback: false
},
head: {
title,
meta: [
{ hid: 'og:url', property: 'og:url', content: BASE_URL },
{ hid: 'og:type', property: 'og:type', content: 'website' },
{ hid: 'og:title', property: 'og:title', content: title },
{ hid: 'og:site_name', property: 'og:site_name', content: 'guy.is' },
// description
{ hid: 'description', name: 'description', content: description },
{ hid: 'og:description', property: 'og:description', content: description },
// image
{ hid: 'og:image', property: 'og:image', content: new URL(imagePath, BASE_URL).toString() },
{ hid: 'og:image:type', property: 'og:image:type', content: 'image/png' },
{ hid: 'og:image:height', property: 'og:image:height', content: 720 },
{ hid: 'og:image:width', property: 'og:image:width', content: 800 }
],
link: [
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: 'anonymous' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Press+Start+2P' }
]
},
loading: false,
manifest: {
name: title,
ogType: null,
ogTitle: null,
ogDescription: null,
ogSiteName: null,
description: null,
display: 'standalone',
theme_color: '#000',
twitterSite: '@robozevel',
twitterCreator: '@robozevel'
},
modules: [
['@nuxtjs/pwa', { icon: false }],
['@nuxtjs/google-analytics', {
id: 'UA-139919699-1'
}]
],
build: {
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
}
})