generated from svglol/nuxt-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
117 lines (117 loc) · 2.68 KB
/
nuxt.config.ts
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'@nuxt/test-utils/module',
'@nuxt/devtools',
'@nuxt/ui',
'@vue-macros/nuxt',
'@vueuse/nuxt',
'@vite-pwa/nuxt',
'@nuxtjs/seo',
'@nuxt/fonts',
'@nuxthub/core',
'@nuxt/eslint',
],
hub: {
database: true,
cache: true,
},
devtools: { enabled: true },
experimental: {
componentIslands: true,
typedPages: true,
payloadExtraction: true,
},
app: {
pageTransition: { name: 'page', mode: 'out-in' },
layoutTransition: { name: 'page', mode: 'out-in' },
},
colorMode: {
preference: 'dark',
fallback: 'dark',
},
tailwindcss: {
cssPath: '~/assets/global.css',
},
runtimeConfig: {
database: {
url: process.env.DATABASE_URL,
token: process.env.DATABASE_AUTH_TOKEN,
},
},
pwa: {
strategies: 'generateSW',
registerType: 'autoUpdate',
manifest: {
name: 'Endurance Results',
short_name: 'Endurance Results',
theme_color: '#18181b',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'pwa-512x512-maskable.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
},
injectManifest: {
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
},
client: {
installPrompt: true,
// you don't need to include this: only for testing purposes
// if enabling periodic sync for update use 1 hour or so (periodicSyncForUpdates: 3600)
periodicSyncForUpdates: 20,
},
devOptions: {
enabled: false,
suppressWarnings: true,
navigateFallback: '/',
navigateFallbackAllowlist: [/^\/$/],
type: 'module',
},
},
site: {
url: process.env.NUXT_PUBLIC_SITE_URL,
name: 'Endurance Results',
description: 'Get all endurance racing results in one place!',
defaultLocale: 'en',
},
sitemap: {
sources: ['/api/__sitemap__/urls'],
cacheMaxAgeSeconds: 3600,
runtimeCacheStorage: {
driver: 'cloudflareKVBinding',
binding: 'CACHE',
},
},
ogImage: {
fonts: ['Noto+Sans:400', 'Noto+Sans:700'],
runtimeCacheStorage: {
driver: 'cloudflareKVBinding',
binding: 'CACHE',
},
defaults: {
cacheMaxAgeSeconds: 60 * 60 * 24 * 7 * 1000, // 7 days
},
},
nitro: {
experimental: {
openAPI: true,
},
},
})