-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
157 lines (142 loc) · 4.46 KB
/
nuxt.config.ts
File metadata and controls
157 lines (142 loc) · 4.46 KB
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
// Modules
modules: [// '@nuxtjs/sentry', // TODO: Temporarily disabled - needs Nuxt 4 compatible version
'nuxt-svgo', '@nuxt/eslint', '@vueuse/nuxt', '@nuxtjs/color-mode', '@nuxt/content'],
// SSG mode for static generation
ssr: true,
// Enable devtools in development
devtools: { enabled: true },
// App configuration
app: {
head: {
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
title: 'Indicium',
meta: [
{ name: 'description', content: 'Wij zijn dé studievereniging voor HBO-ICT van Hogeschool Utrecht' },
// Open Graph
{ property: 'og:site_name', content: 'Studievereniging Indicium' },
{ property: 'og:title', content: 'Studievereniging Indicium' },
{ property: 'og:description', content: 'Dé studievereniging voor HBO-ICT van Hogeschool Utrecht' },
{ property: 'og:url', content: 'https://svindicium.nl/' },
{ property: 'og:type', content: 'website' },
{ property: 'og:image', content: 'https://svindicium.nl/og-logo.png' },
{ property: 'og:image:alt', content: 'Indicium' },
// Twitter / X
{ name: 'twitter:card', content: 'summary_large_image' },
],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' },
// Preload fonts
{
rel: 'preload',
href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap',
as: 'style',
onload: 'this.onload=null;this.rel="stylesheet"',
},
{
rel: 'preload',
href: '/fonts/constan.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
],
script: [],
style: [
// Anti-flicker script - prevents flash of wrong theme on page load
// Matches colors from variables.scss for consistency
{
innerHTML: `
:root {
color-scheme: light;
background-color: rgb(255, 255, 255);
color: rgb(51, 51, 51);
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
background-color: rgb(11, 20, 22);
color: rgb(242, 242, 242);
}
}
/* Respect user preference stored in localStorage */
[data-theme='dark'] {
color-scheme: dark;
background-color: rgb(11, 20, 22) !important;
color: rgb(242, 242, 242) !important;
}
[data-theme='light'] {
color-scheme: light;
background-color: rgb(255, 255, 255) !important;
color: rgb(51, 51, 51) !important;
}
`,
},
],
noscript: [
{
innerHTML: 'JavaScript is required to use this website.',
},
],
},
},
// CSS configuration
css: ['~/assets/scss/main.scss'],
// Vue configuration for custom elements
vue: {
compilerOptions: {
isCustomElement: (tag) => ['add-to-calendar-button'].includes(tag),
},
},
// Build configuration
build: {
transpile: ['v-viewer'],
},
compatibilityDate: '2024-11-01',
// Nitro configuration for static site generation
nitro: {
preset: 'static',
prerender: {
crawlLinks: true,
routes: ['/'],
},
},
// Vite configuration
vite: {
css: {
preprocessorOptions: {
scss: {
additionalData: `
@use '@/assets/scss/variables' as *;
@use '@/assets/scss/typography' as *;
`,
},
},
},
},
// TypeScript configuration
typescript: {
strict: true,
typeCheck: false,
},
// ESLint module configuration
eslint: {
config: {
stylistic: false, // Disable stylistic rules, using Prettier instead
},
},
// Color mode configuration
colorMode: {
preference: 'system', // default value of $colorMode.preference
fallback: 'light', // fallback value if not system preference found
classSuffix: '-mode', // adds class like .dark-mode, .light-mode to <html>
dataValue: 'theme', // adds data-theme="dark" or "light" to <html>
storageKey: 'nuxt-color-mode', // localStorage key
},
// SVGO configuration for SVG optimization
svgo: {
defaultImport: 'component',
},
});