-
Notifications
You must be signed in to change notification settings - Fork 20
/
nuxt.config.ts
131 lines (115 loc) · 2.74 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import { defineNuxtConfig } from "nuxt/config";
import en from "./locales/en-US.json";
import fr from "./locales/fr-FR.json";
import ar from "./locales/ar-AR.json";
export default defineNuxtConfig({
devtools: { enabled: true },
runtimeConfig: {
public: {
baseUrl: process.env.VITE_BASE_URL // || 'http://localhost:3000'
}
},
nitro: {
compressPublicAssets: true,
logLevel: 4,
},
modules: [
"@nuxt/eslint",
"@pinia/nuxt",
"@nuxtjs/device",
"@nuxt/icon",
"@nuxt/image",
"@nuxtjs/tailwindcss",
"@nuxtjs/google-fonts",
"@nuxtjs/color-mode",
"@nuxtjs/i18n",
"@dargmuesli/nuxt-cookie-control",
],
tailwindcss: {
cssPath: "~/assets/css/tailwind.css",
configPath: "tailwind.config.ts",
exposeConfig: false,
viewer: true,
},
postcss: {
plugins: {
"postcss-import": {},
tailwindcss: {},
autoprefixer: {},
},
},
imports: {
dirs: ["./stores", "./locales"],
},
app: {
head: {
charset: "utf-8",
viewport: "width=device-width, initial-scale=1",
},
},
colorMode: {
classSuffix: "",
},
image: {
provider: "ipx", // change to e.g 'vercel' if hosted on vercel
quality: 80,
format: ["png", "jpeg", "webp"],
},
googleFonts: {
families: {
Inter: true,
},
display: "swap",
prefetch: true,
preconnect: true,
},
i18n: {
baseUrl: process.env.VITE_BASE_URL,
vueI18n: "./i18n.config.ts",
detectBrowserLanguage: {
useCookie: false,
alwaysRedirect: true,
fallbackLocale: "en-US",
redirectOn: "root", // recommended
},
},
eslint: {
lintOnStart: false,
},
pinia: {
autoImports: ['defineStore', 'acceptHMRUpdate'],
},
cookieControl: {
cookieExpiryOffsetMs: 1000 * 60 * 60 * 24 * 365, // one year
// set all these to true for highest GDPR enforcement
isAcceptNecessaryButtonEnabled: true,
isModalForced: false,
isCookieIdVisible: true,
closeModalOnClickOutside: true,
// show cookie button
isControlButtonEnabled: true,
// disable to get unstyled css for tailwind
isCssEnabled: false,
isDashInDescriptionEnabled: false,
cookies: {
necessary: [{
name: {
fr: fr.cookies.necessary.title,
en: en.cookies.necessary.title,
ar: ar.cookies.necessary.title,
},
description: {
fr: fr.cookies.necessary.description,
en: en.cookies.necessary.description,
ar: ar.cookies.necessary.description,
},
isPreselected: true,
id: "necessary"
}],
optional: [],
},
locales: ["en", "fr", "ar"],
},
compatibilityDate: "2024-12-26",
});