-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnuxt.config.ts
159 lines (141 loc) · 2.9 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
import { setAbsoluteSqliteDatabaseUrlForPrisma } from './prisma/utils'
setAbsoluteSqliteDatabaseUrlForPrisma()
export default defineNuxtConfig({
app: {
pageTransition: { name: 'page', mode: 'out-in' },
},
runtimeConfig: {
version: '0.0.1',
s3: {
endpoint: '',
bucket: '',
accessKeyId: '',
secretAccessKey: '',
},
},
routeRules: {
// generated on demand, revalidates in background, cached until API response changes
'/': { swr: true },
'/flow/**': { swr: true },
'/space': { swr: true },
'/space/**': { swr: true },
// Admin dashboard renders only on client-side
'/admin/**': { ssr: false },
// Add cors headers on API routes
'/api/**': { cors: true },
},
build: {
transpile: ['trpc-nuxt'],
},
webVitals: {
ga: { id: 'G-JF2ZGKT7MM' },
},
gtag: {
id: 'G-JF2ZGKT7MM',
},
modules: [
'nuxt-svgo',
'@nuxt/image',
'nuxt-scheduler',
'@nuxtjs/google-fonts',
'nuxt-icon',
'@nuxtjs/seo',
'@nuxtjs/tailwindcss',
[
'@pinia/nuxt',
{
autoImports: [
// 自动引入 `defineStore()`
'defineStore',
],
},
],
'@nuxtjs/html-validator',
'@nuxtjs/web-vitals',
'nuxt-gtag',
'@nuxt/eslint',
'@vueuse/nuxt',
],
eslint: {
config: {
stylistic: {
indent: 'tab',
},
},
},
shadcn: {
/**
* Prefix for all the imported component
*/
prefix: '',
/**
* Directory that the component lives in.
* @default "./components/ui"
*/
componentDir: './components/ui',
},
ogImage: {
googleFontMirror: true,
fonts: [
// will load the Noto Sans font from Google fonts
'Noto+Serif+SC',
],
},
site: {
url: 'https://i.nexmoe.com',
name: 'Nexmoe',
description: '充满热情的开发者和创造者,热衷于未来主义和赛博朋克,追求良好的用户体验和界面设计。分享技术见解、优化技巧和对生活的热爱,提供有价值的内容和工具,通过技术改善日常生活。',
},
sitemap: {
sitemaps: {
categories: {
sources: [
'/api/__sitemap__/urls/categories',
],
},
},
},
image: {
format: ['webp'],
quality: 85,
domains: [
'p3-juejin.byteimg.com',
'sns-webpic-qc.xhscdn.com',
'picx.zhimg.com',
'image.coolapk.com',
'pic1.zhimg.com',
'pic2.zhimg.com',
'pic3.zhimg.com',
'pic4.zhimg.com',
'unavatar.io',
'i.dawnlab.me',
'ipfs.crossbell.io',
'space.r2.102415.xyz',
],
},
googleFonts: {
text: '莫听穿林打叶声何妨吟啸且徐行竹杖芒鞋轻胜马谁怕?一蓑烟雨任平生',
families: {
'Zhi Mang Xing': {
},
},
},
typescript: {
shim: false,
},
imports: {
dirs: [
// Scan top-level modules
'composables',
// ... or scan modules nested one level deep with a specific name and file extension
'composables/*/index.{ts,js,mjs,mts}',
// ... or scan all modules within given directory
'composables/**',
],
},
devtools: {
timeline: {
enabled: true,
},
},
})