generated from atinux/atidone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
97 lines (94 loc) · 2.31 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
import type { NuxtPage } from 'nuxt/schema'
export default defineNuxtConfig({
devtools: { enabled: true },
build: {
transpile: ['vue-echarts']
},
app: {
head: {
link: [{
rel: 'stylesheet',
href: 'https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/default.min.css'
}],
script: [
{ src: 'https://www.googletagmanager.com/gtag/js?id=G-GQ20PVVE6Y', async: true },
{ src: '/clearity.microsoft.js' },
{ src: '/google.analytics.js' },
{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/markdown-it.min.js' },
{ src: 'https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js' },
{ src: 'https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/languages/go.min.js' }]
}
},
// extends: ['@nuxt/ui-pro'],
modules: [
'@nuxthub/core',
'@nuxt/ui',
'nuxt-auth-utils',
'@nuxt/eslint',
'@nuxt/image',
'@vueuse/nuxt',
'@nuxtjs/i18n',
'@nuxtjs/supabase',
'@vueuse/nuxt'
],
supabase: {
redirectOptions: {
login: '/login',
callback: '/',
include: ['/accounts(/*)?'],
exclude: [],
cookieRedirect: false
}
},
i18n: {
vueI18n: './i18n.config.ts'
},
hub: {
database: true
},
ui: {
icons: ['heroicons', 'simple-icons']
},
eslint: {
config: {
stylistic: {
quotes: 'single',
commaDangle: 'never'
}
}
},
nitro: {
prerender: {
autoSubfolderIndex: false
},
devProxy: {
'/chat': {
target: 'https://ai.sukbearai.xyz/v1/chat/completions',
changeOrigin: true
}
}
},
runtimeConfig: {
appid: '',
secret: '',
cbEnv: '',
geminiProjectId: ''
},
hooks: {
'pages:extend': function (pages) {
// 删除含component的page路由
function removePagesMatching(pattern: RegExp, pages: NuxtPage[] = []) {
const pagesToRemove = []
for (const page of pages) {
if (pattern.test(page.file || ''))
pagesToRemove.push(page)
else
removePagesMatching(pattern, page.children)
}
for (const page of pagesToRemove)
pages.splice(pages.indexOf(page), 1)
}
removePagesMatching(/component|tools/i, pages)
}
}
})