-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
155 lines (147 loc) · 3.99 KB
/
nuxt.config.ts
File metadata and controls
155 lines (147 loc) · 3.99 KB
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'nuxt-icon',
'@maanex/nuxt-apollo-upload',
'@nuxtjs/i18n',
'@vite-pwa/nuxt',
'@vueuse/nuxt',
'@nuxt/image'
],
// Disabled so storage forms like localStorage work for our application
// Since the deploy target is static anyway we don't really need the benefits of ssr anyway
ssr: false,
// experimental: {
// viewTransition: true
// },
app: {
head: {
title: 'Mensatt',
meta: [
{ charset: 'utf-8' },
{ hid: 'description', name: 'description', content: 'Mensatt is providing your high quality information about all Mensas 👍' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover' },
{ name: 'darkreader-lock', content: 'true' },
{ name: 'ScreenOrientation', 'http-equiv': 'ScreenOrientation', content: 'autoRotate:disabled' },
// { name: 'msapplication-TileColor', content: '#c9f1b6' },
// { name: 'theme-color', content: '#c9f1b6' }
],
link: [
// { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' },
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16.png' },
// { rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#5bbad5' }
],
htmlAttrs: {
lang: 'en'
},
script: [
{ async: true, src: 'https://umami.mensatt.de/script.js', 'data-website-id': '3e757e9e-d5a2-43d8-b62f-73b155f99800' }
]
},
},
pwa: {
registerType: 'autoUpdate',
manifest: {
theme_color: '#ffffff',
background_color: '#dce3ea',
display: 'standalone',
scope: '/',
start_url: '/',
name: 'Mensatt',
short_name: 'Mensatt',
description: 'Mensatt - In der Mensa wird man satt',
icons: [
{
src: '/icon-192x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable'
},
{
src: '/icon-256x256.png',
sizes: '256x256',
type: 'image/png',
purpose: 'any maskable'
},
{
src: '/icon-384x384.png',
sizes: '384x384',
type: 'image/png',
purpose: 'any maskable'
},
{
src: '/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
},
workbox: {
navigateFallback: '/',
globPatterns: [ '**/*.{js,css,html,png,svg,ico,json}' ]
},
client: {
installPrompt: true,
},
devOptions: {
enabled: true,
type: 'module'
}
},
nitro: {
prerender: {
crawlLinks: true
}
},
vite: {
css: {
preprocessorOptions: {
scss: {
additionalData: '@import "@/assets/style/imports.scss";'
}
}
}
},
apollo: {
clients: {
prod: {
httpEndpoint: 'https://api.mensatt.de/data/graphql',
useUploadLink: true
},
dev: {
httpEndpoint: 'https://dev-api.mensatt.de/data/graphql',
useUploadLink: true
},
local: {
httpEndpoint: 'https://localhost:4000/data/graphql',
useUploadLink: true
},
},
},
i18n: {
legacy: false,
langDir: 'lang',
defaultLocale: 'de',
fallbackLocale: 'de',
jsTsFormatResource: true,
lazy: true,
// ↓ remove strategy to get mensatt.de/en/about like urls. Downside: PWA entry point url is static -> language gets overwritten on startup. For now we'll rely on cookies only for language persistence.
strategy: 'no_prefix',
locales: [
{
code: 'de',
iso: 'de',
file: 'de.js',
name: 'Deutsch'
},
{
code: 'en',
iso: 'en',
file: 'en.js',
name: 'English'
},
]
}
})