-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
123 lines (115 loc) · 2.96 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
118
119
120
121
122
123
import { isDevelopment } from "std-env";
export default defineNuxtConfig({
app: {
keepalive: true,
head: {
charset: "utf-8",
viewport: "width=device-width,initial-scale=1",
title: "Gravitalia",
htmlAttrs: {
lang: "en",
},
meta: [
{ property: "og:type", content: "website" },
{ property: "og:site_name", content: "Gravitalia" },
{ property: "og:title", content: "Gravitalia" },
{ property: "og:image", content: "/favicon.webp" },
{
name: "og:description",
content:
"Gravitalia, all connected. Share your photos in complete security and privacy.",
},
{ name: "theme-color", content: "#8b5cf6" },
{ name: "robots", content: "index, follow" },
{ name: "twitter:card", content: "summary" },
{ name: "twitter:site", content: "@gravitalianews" },
{
name: "description",
content:
"Gravitalia, all connected. Share your photos in complete security and privacy.",
},
],
link: [{ rel: "manifest", href: "/manifest.json" }],
script: [
{
innerHTML: !isDevelopment
? '"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js",{scope:"/"});'
: "",
},
],
bodyAttrs: {
class: "dark:bg-zinc-900 dark:text-white",
},
},
},
ssr: false,
components: true,
spaLoadingTemplate: "pages/loading.html",
sourcemap: isDevelopment,
modules: [
"@pinia/nuxt",
[
"@nuxtjs/color-mode",
{
preference: "system",
fallback: "light",
hid: "color-script",
globalName: "__NUXT_COLOR_MODE__",
componentName: "ColorScheme",
classPrefix: "",
classSuffix: "",
storageKey: "mode",
},
],
[
"@nuxtjs/i18n",
{
defaultLocale: "en",
strategy: "no_prefix",
lazy: true,
langDir: "locales",
detectBrowserLanguage: {
useCookie: true,
cookieKey: "locale",
redirectOn: "root",
fallbackLocale: "en",
alwaysRedirect: true,
},
locales: [
{
code: "en",
iso: "en-US",
file: "en-US.json",
name: "English",
},
{
code: "fr",
iso: "fr-FR",
file: "fr-FR.json",
name: "Français",
},
],
baseUrl: "https://www.gravitalia.com",
},
],
"@nuxtjs/tailwindcss",
"@nuxt/image",
"@nuxt/eslint",
],
routeRules: {
// No JS.
"/": { experimentalNoScripts: false },
},
devtools: { enabled: isDevelopment },
nitro: {
preset: "cloudflare_pages",
},
vite: {
define: {
// By default, Vite doesn't include shims for NodeJS/
// necessary for segment analytics lib to work
global: {},
},
},
compatibilityDate: "2024-09-01",
});