-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
100 lines (100 loc) · 2.3 KB
/
nuxt.config.ts
File metadata and controls
100 lines (100 loc) · 2.3 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2025-04-09",
devtools: { enabled: false },
modules: [
"@nuxtjs/sitemap",
"nuxt-cron",
"@vite-pwa/nuxt",
"@waradu/keyboard/nuxt",
],
ssr: true,
runtimeConfig: {
pasetoKey: process.env.NUXT_PASETO_KEY,
adminKey: process.env.NUXT_ADMIN_KEY,
baseUrl: process.env.NUXT_BASE_URL,
disableRegistering: process.env.NUXT_DISABLE_REGISTRATION,
githubClientId: process.env.NUXT_GITHUB_CLIENT_ID,
githubClientSecret: process.env.NUXT_GITHUB_CLIENT_SECRET,
epilogueAppId: process.env.NUXT_EPILOGUE_APP_ID,
epilogueAppSecret: process.env.NUXT_EPILOGUE_APP_SECRET,
},
nitro: {
preset: "node-server",
experimental: {
openAPI: process.env.NODE_ENV === "development",
wasm: false,
},
minify: true,
},
app: {
head: {
charset: "utf-8",
viewport:
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",
title: "Ziit",
},
},
cron: {
runOnInit: true,
timeZone: "UTC+0",
jobsDir: "cron",
},
routeRules: {
"/api/**": {
cors: true,
},
"/leaderboard": { cache: { maxAge: 5 * 60 } },
"/stats": { cache: { maxAge: 5 * 60 } },
},
sitemap: {
defaults: {
lastmod: new Date().toISOString(),
priority: 0.9,
changefreq: "weekly",
},
urls: [
{
loc: "/stats",
lastmod: new Date().toISOString(),
priority: 1,
changefreq: "daily",
},
{
loc: "/leaderboard",
lastmod: new Date().toISOString(),
priority: 0.9,
changefreq: "daily",
},
],
},
pwa: {
manifest: {
name: "Ziit",
short_name: "Ziit",
theme_color: "#191919",
background_color: "#191919",
display: "standalone",
orientation: "portrait",
icons: [
{
src: "/pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
],
},
devOptions: {
enabled: true,
suppressWarnings: true,
navigateFallback: "/",
navigateFallbackAllowlist: [/^\/$/],
type: "module",
},
},
});