-
Notifications
You must be signed in to change notification settings - Fork 3
/
nuxt.config.ts
48 lines (46 loc) · 1.09 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
import gitCommitInfo from 'git-commit-info';
import { profiles } from './server/profiles';
import { i18n, locales } from './config/i18n';
const routesToPrerender: Array<string> = ['/'];
profiles.forEach((profile) => {
routesToPrerender.push(
`/${profile.person.name.first.toLowerCase()}`,
);
locales.forEach((locale) => {
routesToPrerender.push(
`/${locale.code}/${profile.person.name.first.toLowerCase()}`,
);
});
});
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'@nuxt/image',
'@nuxtjs/i18n',
'@nuxt/ui',
],
nitro: {
prerender: {
crawlLinks: true,
routes: routesToPrerender,
},
},
runtimeConfig: {
public: {
commitHash: gitCommitInfo().shortHash,
buildDate: new Date().toISOString(),
},
},
image: {
format: ['avif', 'webp', 'png'],
dir: 'assets/images',
provider: 'ipx',
},
tailwindcss: {
exposeConfig: true,
},
i18n,
// TODO move to nuxt4 compatability at some point
compatibilityDate: '2024-09-05',
});