-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.ts
96 lines (83 loc) · 2.35 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
// https://nuxt.com/docs/api/configuration/nuxt-config
const isDev = process.env.NODE_ENV === "development";
export default defineNuxtConfig({
/* typescript: {
strict: true,
}, */
devtools: { enabled: isDev ? true : false },
nitro: {
routeRules: {
// About this and hydration problem: https://github.com/nuxt/nuxt/issues/12266#issuecomment-1569771479
"/**": { ssr: false },
/*
// Homepage pre-rendered at build time
'/': { prerender: true },
// Product page generated on-demand, revalidates in background
'/products/**': { swr: true },
// Blog post generated on-demand once until next deploy
'/blog/**': { isr: true },
// Admin dashboard renders only on client-side
'/admin/**': { ssr: false },
// Add cors headers on API routes
'/api/**': { cors: true },
// Redirects legacy urls
'/old-page': { redirect: '/new-page' }
*/
},
},
runtimeConfig: {
// Auth
supabaseUrl: "",
supabaseAnonKey: "",
// General
currentEnv: "",
baseUrl: "",
// WebRTC
webRtcApiBaseUrl: "",
livekitHostUrl: "",
// Realtime
realtimeApiUrl: "",
},
modules: [
"nuxt-icon", // https://nuxt.com/modules/icon
"@nuxtjs/color-mode", // https://color-mode.nuxtjs.org/
"@pinia/nuxt", // https://pinia.vuejs.org/ssr/nuxt.html
"@vueuse/nuxt", // https://vueuse.org/nuxt/README.html
"@nuxtjs/i18n", // https://i18n.nuxtjs.org/
"@nuxtjs/tailwindcss", // https://tailwindcss.nuxtjs.org/getting-started/setup
"@nuxtjs/google-fonts", // https://google-fonts.nuxtjs.org/setup
],
pinia: {
autoImports: [["defineStore", "definePiniaStore"]],
},
colorMode: {
preference: "dark", // default theme
dataValue: "theme", // activates data-theme in <html> tag
classSuffix: "",
},
googleFonts: {
families: {
Cabin: true,
},
display: "swap",
prefetch: false,
preconnect: false,
preload: true,
download: false,
base64: false,
},
i18n: {
detectBrowserLanguage: {
useCookie: false,
fallbackLocale: "en",
},
strategy: "no_prefix",
locales: [
{ code: "en", iso: "en-US", file: "en.yml", name: "English", dir: "ltr" },
{ code: "ja", iso: "ja-JP", file: "ja.yml", name: "日本語", dir: "ltr" },
],
lazy: true,
langDir: "lang/",
defaultLocale: "en",
},
});