-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
160 lines (159 loc) · 4.5 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// https://nuxt.com/docs/api/configuration/nuxt-config
import vue from "@vitejs/plugin-vue";
import {envVarsConfig, i18nPages, nitroPrerenderRoutes} from "./utils/config";
export default defineNuxtConfig({
ssr: false,
site: {indexable: false}, // Disable indexing until the website is ready.
app: {
head: {
script: [
{
hid: "newrelic",
src: "/assets/scripts/newrelic.js",
defer: true,
type: "text/javascript"
}
]
}
},
alias: {
assets: "/<rootDir>/assets"
},
css: ["~/assets/main.scss"],
devtools: {enabled: true},
modules: [
"@morev/vue-transitions/nuxt",
"@nuxt/content",
"@nuxt/image",
"@nuxtjs/color-mode",
"@nuxtjs/i18n",
"@nuxtjs/mdc",
"@nuxtjs/robots",
"@nuxtjs/stylelint-module",
"@nuxtjs/tailwindcss",
"@vee-validate/nuxt",
"@vueuse/nuxt",
"nuxt-icon",
"nuxt-rollbar",
"nuxt-vuefire",
"@nuxt/eslint"
],
eslint: {
config: {
standalone: false // <--- Required for Antfu ESLint config
}
},
postcss: {
plugins: {
"postcss-import": {},
"tailwindcss/nesting": "postcss-nesting",
"autoprefixer": {},
"tailwindcss": {}
}
},
typescript: {
shim: false,
strict: true,
typeCheck: true
},
image: {
formats: ["avif", "webp", "gif", "png"]
},
i18n: {
locales: ["de", "en"],
defaultLocale: "en",
vueI18n: "./i18n.config.ts",
detectBrowserLanguage: false,
// Disable custom route with page components.
customRoutes: "config",
pages: i18nPages
},
vuefire: {
auth: {
enabled: true,
sessionCookie: true
},
// TODO: Consider enabling AppCheck.
// API keys for Firebase are not private.
// See https://firebase.google.com/support/guides/security-checklist#api-keys-not-secret
config: {
apiKey: envVarsConfig.firebaseApiKey,
authDomain: envVarsConfig.firebaseAuthDomain,
projectId: envVarsConfig.firebaseProjectId,
storageBucket: envVarsConfig.firebaseStorageBucket,
messagingSenderId: envVarsConfig.firebaseMessagingSenderId,
appId: envVarsConfig.firebaseAppId,
measurementId: envVarsConfig.firebaseMeasurementId
}
},
tailwindcss: {
exposeConfig: true,
editorSupport: true,
cssPath: ["~/assets/main.scss", {injectPosition: "last"}]
},
colorMode: {
classSuffix: "",
preference: "system",
fallback: "dark"
},
imports: {
imports: [
{
from: "tailwind-variants",
name: "tv"
},
{
from: "tailwind-variants",
name: "VariantProps",
type: true
},
{
from: "vue-sonner",
name: "toast",
as: "useSonner"
}
]
},
runtimeConfig: {
appEnv: envVarsConfig.appEnv,
apiUrl: envVarsConfig.apiUrl,
mailSmtp: envVarsConfig.mailSmtp,
mailPort: envVarsConfig.mailPort,
mailUsername: envVarsConfig.mailUsername,
mailPassword: envVarsConfig.mailPassword,
mailAdminAddress: envVarsConfig.mailAdminAddress,
userAccountValidationUrl: envVarsConfig.userAccountValidationUrl
},
build: {
transpile: ["vue-sonner"]
},
compatibilityDate: {
default: "2024-08-02",
firebase: "2024-08-02"
},
rollbar: {
clientAccessToken: envVarsConfig.rollbarClientAccessToken,
mode: "all",
config: {
captureIp: "anonymize",
captureUncaught: true,
captureUnhandledRejections: true,
captureUsername: true,
captureDeviceInfo: true,
addErrorContext: true,
enabled: envVarsConfig.appEnv !== "development",
payload: {
environment: envVarsConfig.appEnv
}
}
},
nitro: {
prerender: {
routes: nitroPrerenderRoutes
},
rollupConfig: {
// @ts-expect-error See https://vuemail.net/getting-started/nuxt-nitro .
plugins: [vue()]
}
}
});