-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
100 lines (95 loc) · 2.55 KB
/
Copy pathnuxt.config.ts
File metadata and controls
100 lines (95 loc) · 2.55 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
import { randomBytes } from "crypto";
export default defineNuxtConfig({
compatibilityDate: "2025-07-15",
devtools: { enabled: true },
runtimeConfig: {
// 私有配置
wordpressURL: process.env.wordpressURL,
wordpressUserName: process.env.wordpressUserName,
wordpressAuthToken: process.env.wordpressAuthToken,
// totp种子
captchaSecret:
process.env.CAPTCHA_SECRET || randomBytes(32).toString("hex"),
commSecret: process.env.COMM_SECRET || randomBytes(32).toString("hex"),
// 公开配置
public: {
apiBase: "/api",
},
},
image: {
provider: "hachimi",
inject: true,
format: ["webp"],
quality: 100,
providers: {
hachimi: {
provider: "~/providers/hachimi",
},
},
},
icon: {
customCollections: [
{
prefix: "local",
dir: "./app/icons",
},
],
},
formkit: {
autoImport: true,
},
modules: [
"@nuxt/eslint",
"@nuxt/icon",
"@nuxt/image",
"@element-plus/nuxt",
"@pinia/nuxt",
"@vueuse/nuxt",
"pinia-plugin-persistedstate/nuxt",
"@formkit/nuxt",
"nuxt-monaco-editor",
"motion-v/nuxt",
],
vite: {
optimizeDeps: {
include: [
// UI
"element-plus",
"@element-plus/icons-vue",
"lodash-unified",
// 状态
"@vueuse/core",
"pinia",
"pinia-plugin-persistedstate",
// dayjs
"dayjs",
"dayjs/plugin/timezone",
"dayjs/plugin/localeData",
"dayjs/plugin/localizedFormat",
"dayjs/plugin/utc",
"dayjs/locale/zh",
"dayjs/locale/en",
// 工具
"highlight.js",
"otpauth",
"jose",
"lodash-es",
"htmlparser2",
"markdown-it",
"markdown-it-texmath",
"katex",
"medium-zoom",
"tocbot",
"@tsparticles/engine",
"@tsparticles/all",
"typed.js",
"mitt",
"vue-cloudflare-turnstile",
'md5',
],
},
},
imports: {
dirs: ["composables/**", "utils/**"],
},
});