/ nuxt.config.ts
nuxt.config.ts
1 // https://nuxt.com/docs/api/configuration/nuxt-config 2 export default defineNuxtConfig({ 3 compatibilityDate: "2025-04-09", 4 devtools: { enabled: false }, 5 modules: ["@nuxtjs/sitemap", "nuxt-cron", "@vite-pwa/nuxt", "@waradu/keyboard/nuxt"], 6 ssr: true, 7 runtimeConfig: { 8 pasetoKey: process.env.NUXT_PASETO_KEY, 9 githubClientId: process.env.NUXT_GITHUB_CLIENT_ID, 10 githubClientSecret: process.env.NUXT_GITHUB_CLIENT_SECRET, 11 githubRedirectUri: process.env.NUXT_GITHUB_REDIRECT_URI, 12 corsOrigin: process.env.NUXT_HOST || "same-origin", 13 disableRegistering: process.env.NUXT_DISABLE_REGISTRATION, 14 }, 15 nitro: { 16 preset: "bun", 17 }, 18 app: { 19 head: { 20 charset: "utf-8", 21 viewport: 22 "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no", 23 title: "Ziit", 24 }, 25 }, 26 cron: { 27 runOnInit: true, 28 timeZone: "UTC+0", 29 jobsDir: "cron", 30 }, 31 routeRules: { 32 "/api/**": { 33 cors: true, 34 }, 35 }, 36 sitemap: { 37 defaults: { 38 lastmod: new Date().toISOString(), 39 priority: 0.9, 40 changefreq: "weekly", 41 }, 42 urls: [ 43 { 44 loc: "/stats", 45 lastmod: new Date().toISOString(), 46 priority: 1, 47 changefreq: "daily", 48 }, 49 ], 50 }, 51 pwa: { 52 manifest: { 53 name: "Ziit", 54 short_name: "Ziit", 55 theme_color: "#191919", 56 background_color: "#191919", 57 display: "standalone", 58 orientation: "portrait", 59 icons: [ 60 { 61 src: "/pwa-192x192.png", 62 sizes: "192x192", 63 type: "image/png", 64 }, 65 { 66 src: "/pwa-512x512.png", 67 sizes: "512x512", 68 type: "image/png", 69 }, 70 ], 71 }, 72 devOptions: { 73 enabled: true, 74 suppressWarnings: true, 75 navigateFallback: "/", 76 navigateFallbackAllowlist: [/^\/$/], 77 type: "module", 78 }, 79 }, 80 });