-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
70 lines (66 loc) · 1.48 KB
/
nuxt.config.ts
File metadata and controls
70 lines (66 loc) · 1.48 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2025-01-11',
devtools: { enabled: true },
runtimeConfig: {
public: {
botUsername: process.env.NUXT_PUBLIC_BOT_USERNAME
},
apiBase: process.env.API_BASE
},
routeRules: {
'/api/v1/artwork/random': {
redirect: `${process.env.API_BASE}/artwork/random`
},
'/setu': {
redirect: `${process.env.API_BASE}/artwork/random/preview`
},
'/sese': {
redirect: `${process.env.API_BASE}/picture/random`
},
'/atom.xml': {
proxy: `${process.env.API_BASE}/atom`
}
},
nitro: {
rollupConfig: {
external: ['@resvg/resvg-js']
}
},
modules: [
'@varlet/nuxt',
'@pinia/nuxt',
'@vueuse/nuxt',
'nuxt-api-party',
'nuxt-umami',
'@nuxt/icon',
'@nuxtjs/fontaine',
'pinia-plugin-persistedstate/nuxt',
],
piniaPluginPersistedstate: {
storage: 'localStorage'
},
apiParty: {
endpoints: {
acgapi: {
url: process.env.API_BASE!,
cookies: true
}
},
client: process.env.CLIENT_MODE === 'always' ? 'always' : process.env.CLIENT_MODE === 'true'
},
umami: {
id: process.env.UMAMI_ID,
host: process.env.UMAMI_HOST,
domains: [process.env.UMAMI_DOMAIN || 'manyacg.top'],
autoTrack: true
},
icon: {
serverBundle: 'auto',
clientBundle: {
scan: true,
includeCustomCollections: true,
sizeLimitKb: 256
}
}
})