-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnuxt.config.ts
204 lines (167 loc) · 4.13 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*
* @file: \nuxt.config.ts
* @desc: https://nuxt.com/docs/api/configuration/nuxt-config
* https://codybontecou.com/how-to-use-vuetify-with-nuxt-3.html
* https://nitro.unjs.io/deploy/providers/cloudflare
* https://neon.tech/blog/build-and-deploy-global-serverless-nuxt-ssr-app-with-cloudflare-hyperdrive-and-postgres
* -------------------------------------------
* Created Date: 26th October 2023
* Modified: Fri 20 December 2024 - 13:39:43
*/
import { defineNuxtConfig } from 'nuxt/config';
// import vuetify from 'vite-plugin-vuetify'
// import { transformAssetUrls } from 'vite-plugin-vuetify'
export default defineNuxtConfig({
compatibilityDate: '2024-08-15',
ssr: true,
nitro: {
// preset: 'static'
// preset: 'cloudflare-pages',
prerender: {
routes: ['/sitemap']
}
},
sourcemap: { server: false, client: true },
features: {
devLogs: false,
inlineStyles: false,
},
experimental: {
payloadExtraction: false,
},
typescript: {
shim: false,
},
// auto import components
components: true,
modules: [
// '@nuxt/image',
'@nuxt/content',
'@nuxt/devtools',
'@nuxtjs/seo',
'@pinia/nuxt',
'@vueuse/nuxt',
'vue-sonner/nuxt',
'vuetify-nuxt-module'
],
// Auto import pinia stores
imports: {
autoImport: true,
// injectAtEnd: true,
dirs: ['./stores'],
presets: [
{
from: 'pinia',
imports: ['mapStores', 'mapState'], // ['defineStore', 'mapStores', 'acceptHMRUpdate'],
},
],
},
css: [
//'vuetify/lib/styles/main.sass',
// '@mdi/font/css/materialdesignicons.min.css',
'@/assets/scss/main.scss',
],
// 'animate.css/animate.min.css'
build: {
transpile: [
'rxjs',
// 'vue-sonner',
// 'vuetify'
],
},
runtimeConfig: {
public: {
built_at: process.env.BUILD_TIME || new Date().toISOString(),
}
},
// content: {
// // ... options
// },
app: {
head: {
bodyAttrs: {
'class': 'antialiased',
'data-bs-theme': 'dark',
},
},
},
vuetify: {
styles: { configFile: './assets/scss/settings.scss' },
prefixComposables: true,
vuetifyOptions: './vuetify.config.js',
},
//+-------------------------------------------------
// Seo Modules and configuration
//+-------------------------------------------------
site: {
url: 'https://backlog.rip',
name: 'Backlog.rip',
description: 'Free and open source library manager for all your games.',
defaultLocale: 'en', // not needed if you have @nuxtjs/i18n installed
},
sitemap: {
cacheMaxAgeSeconds: 3600 * 24,
exclude: ['/tabler*', '/account/**', '/dev/**'],
// urls: async () => {
// const urls = await fetch('https://api.backlog.rip/sitemap.xml')
// return urls
// }
sources: [
'https://api.backlog.rip/sitemap.xml',
],
},
ogImage: { enabled: false },
// robots: {
// enabled: false
// },
// seoExperiments: {
// enabled: false
// },
schemaOrg: {
enabled: true,
},
// linkChecker: {
// enabled: false
// },
webpack: {
// extractCSS: true,
},
vite: {
define: {
'process.env.DEBUG': false,
},
css: {},
plugins: [
// {
// name: 'ignore-css-warnings',
// enforce: 'post',
// configResolved(config) {
// const originalWarn = config.logger.warn;
// config.logger.warn = (...args) => {
// if (typeof args[0] === 'string' && args[0].includes('@charset must precede all other statements')) {
// // Ignore the specific warning
// return;
// }
// // For all other warnings, call the original warn method
// originalWarn.apply(config.logger, args);
// };
// },
// },
],
vue: {
template: {
// transformAssetUrls,
// compilerOptions: {
// isCustomElement: (tag) => ['ninja-keys'].includes(tag),
// },
},
},
},
devtools: {
enabled: true,
vscode: {},
timeline: {
enabled: false,
},
},
})