-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
141 lines (134 loc) · 4.31 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// https://nuxt.com/docs/api/configuration/nuxt-config
const CACHE_VARIES = ['host', 'accept-encoding', 'user-agent', 'sec-ch-viewport-height', 'sec-ch-viewport-width'];
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: {enabled: true},
sourcemap: {
server: true,
client: true
},
app: {
head: {
link: [
{
rel: 'preconnect',
href: 'https://cdn.jsdelivr.net/'
},
{
rel: 'dns-prefetch',
href: 'https://imagedelivery.net/'
},
{
rel: 'dns-prefetch',
href: 'https://api.mineskin.org/'
}
]
}
},
ssr: process.env.NODE_ENV !== 'development',
routeRules: {
'/my-skins': {ssr: false},
'/gallery': {redirect: {to: '/skins', statusCode: 301}},
'/bulk': {redirect: {to: '/', statusCode: 301}},
'/stats': {redirect: {to: '/', statusCode: 301}},
'/': {
isr: 60 * 2,
cache: {
maxAge: 60 * 60 * 24,
varies: CACHE_VARIES
}
},
'/skins': {
isr: 60 * 2,
cache: {
maxAge: 60 * 60,
varies: CACHE_VARIES
}
},
'/skins/**': {
isr: 60 * 60,
cache: {
maxAge: 60 * 60 * 24,
varies: CACHE_VARIES
}
},
},
plugins: [
'@/plugins/sentry',
'@/plugins/logger',
'@/plugins/notifier',
'@/plugins/mineskin',
'@/plugins/account',
'@/plugins/flagsmith',
'@/plugins/gtag',
],
modules: [
'vuetify-nuxt-module',
'@nuxtjs/i18n',
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
],
vuetify: {
moduleOptions: {
ssrClientHints: {
reloadOnFirstRequest: false,
viewportSize: true
}
},
vuetifyOptions: {
labComponents: 'VSnackbarQueue',
theme: {
defaultTheme: 'mineskin',
themes: {
mineskin: {
dark: true,
colors: {
mskindigo: '#3f51b5ff',
primary: '#4EA5D9',
secondary: '#44CFCB',
accent: '#65B891',
brown: '#562C2C',
mskred: '#F2542D'
}
}
}
},
}
},
i18n: {
strategy: 'prefix_and_default',
baseUrl: 'https://mineskin.org',
defaultLocale: 'en',
lazy: true,
locales: [
{code: 'en', language: 'en-US', name: 'English', file: 'en.json'},
{code: 'de', language: 'de-DE', name: 'German', file: 'de.json'},
{code: 'es', language: 'es-ES', name: 'Spanish', file: 'es.json'},
{code: 'fr', language: 'fr-FR', name: 'French', file: 'fr.json'},
{code: 'ru', language: 'ru-RU', name: 'Russian', file: 'ru.json'},
{code: 'pl', language: 'pl-PL', name: 'Polish', file: 'pl.json'},
{code: 'hi', language: 'hi-HI', name: 'Hindi', file: 'hi.json'},
{code: 'pt', language: 'pt-PT', name: 'Portuguese', file: 'pt.json'},
{code: 'id', language: 'id-ID', name: 'Indonesian', file: 'id.json'},
],
vueI18n: './nuxt-i18n.ts'
},
runtimeConfig: {
public: {
isDev: process.env.NODE_ENV === 'development',
hosts: {
mineskin: process.env.MINESKIN_HOST,
account: process.env.ACCOUNT_HOST,
},
flagsmithEnvironment: process.env.FLAGSMITH_ENVIRONMENT,
cfPagesCommitSha: process.env.CF_PAGES_COMMIT_SHA,
cfPagesBranch: process.env.CF_PAGES_BRANCH,
cfPagesUrl: process.env.CF_PAGES_URL,
sentryDsn: process.env.SENTRY_DSN,
google: {
adsense: process.env.GOOGLE_ADSENSE
},
turnstileSiteKey: process.env.TURNSTILE_SITE_KEY,
}
},
})