-
Notifications
You must be signed in to change notification settings - Fork 16
/
nuxt.config.ts
120 lines (105 loc) · 2.17 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
export default defineNuxtConfig({
telemetry: false,
ssr: true,
css: ['~/assets/css/main.css'],
scripts: {
registry: {
googleTagManager: true,
},
},
runtimeConfig: {
public: {
directusUrl: process.env.DIRECTUS_URL as string,
tvUrl: process.env.DIRECTUS_TV_URL as string,
baseUrl: process.env.NUXT_PUBLIC_SITE_URL as string,
scripts: {
googleTagManager: {
id: process.env.GOOGLE_TAG_MANAGER_ID!,
},
},
},
},
site: {
url: 'https://directus.io',
},
app: {
head: {
link: [
{
rel: 'alternate',
type: 'application/atom+xml',
title: 'Directus RSS Feed',
href: '/rss.xml',
},
],
},
},
typescript: {
typeCheck: true,
},
experimental: {
sharedPrerenderData: true,
buildCache: true,
},
nitro: {
prerender: {
crawlLinks: false,
concurrency: 3,
},
},
routeRules: {},
modules: [
'@vueuse/nuxt',
'@nuxt/image',
'@nuxt/fonts', // https://sitemap.nuxtjs.org/usage/sitemap
'@nuxt/scripts',
'@nuxtjs/sitemap',
'nuxt-og-image',
'@nuxt/icon',
'floating-vue/nuxt',
'nuxt-schema-org',
'@formkit/auto-animate/nuxt',
],
// OG Image Configuration - https://nuxtseo.com/og-image/getting-started/installation
ogImage: {
defaults: {
component: 'OgImageDefault',
width: 1200,
height: 630,
},
fonts: ['Inter:400', 'Inter:700', 'Poppins:400', 'Poppins:600', 'Poppins:700'],
},
// Posthog configuration
posthog: {
capturePageViews: true,
},
// Nuxt Image Configuration - https://image.nuxt.com/get-started/installation
image: {
providers: {
directus: {
provider: 'directus',
options: {
baseURL: `${process.env.DIRECTUS_URL}/assets/`,
},
},
directusTv: {
provider: 'directus',
options: {
baseURL: `${process.env.DIRECTUS_TV_URL}/assets/`,
},
},
},
},
// This is some jank to exit the nuxt build because the build hangs at the very end when using nuxt generate 🤦♂️
// @see https://github.com/nuxt/cli/issues/169#issuecomment-1729300497
// Workaround for https://github.com/nuxt/cli/issues/169
hooks: {
close: () => {
process.exit();
},
},
compatibilityDate: '2024-09-09',
vue: {
propsDestructure: true,
},
});