-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathnuxt.config.ts
executable file
·125 lines (114 loc) · 2.72 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2024-07-03",
rootDir: "nuxt/",
future: {
compatibilityVersion: 4,
},
/**
* Manually disable nuxt telemetry.
* @see [Nuxt Telemetry](https://github.com/nuxt/telemetry) for more information.
*/
telemetry: true,
ssr: false,
$development: {
ssr: false,
devtools: {
enabled: false,
},
},
$production: {
ssr: false,
},
app: {
head: {
title: "Home",
titleTemplate: "%s | ChatBotNext",
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
],
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
},
},
routeRules: {
"auth/verify": { ssr: false },
},
tailwindcss: {
cssPath: "@/assets/css/main.css",
},
css: ["@/assets/css/style.min.css", "@/assets/css/dark.css"],
/**
* @see https://v3.nuxtjs.org/api/configuration/nuxt.config#modules
*/
extends: ["@nuxt/ui-pro"],
modules: [
"@nuxt/ui",
"@nuxt/image",
"@pinia/nuxt",
"dayjs-nuxt",
"nuxt-security",
"@nuxtjs/tailwindcss",
],
ui: {
icons: ["heroicons"],
},
image: {
domains: [import.meta.env.APP_URL || "http://127.0.0.1:8000"],
alias: {
api: import.meta.env.APP_URL || "http://127.0.0.1:8000",
},
},
security: {
headers: {
crossOriginEmbedderPolicy: "unsafe-none",
crossOriginOpenerPolicy: "same-origin-allow-popups",
contentSecurityPolicy: {
"img-src": [
"'self'",
"data:",
"https://*",
import.meta.env.APP_URL || "http://127.0.0.1:8000",
],
},
},
},
dayjs: {
locales: ["en", "zh-cn"], // 添加中文支持
plugins: ["relativeTime", "utc", "timezone"],
defaultLocale: "zh-cn", // 设置默认语言为中文
defaultTimezone: "Asia/Shanghai", // 设置默认时区为上海
},
plugins: ["~/plugins/fetchSettings.ts"],
typescript: {
strict: false,
},
/**
* @see https://v3.nuxtjs.org/guide/features/runtime-config#exposing-runtime-config
*/
runtimeConfig: {
apiLocal: import.meta.env.API_LOCAL_URL,
public: {
apiBase: import.meta.env.APP_URL,
apiPrefix: "/api/v1",
storageBase: import.meta.env.APP_URL + "/storage/",
providers: {
google: {
name: "Google",
icon: "",
color: "gray",
},
},
},
},
build: {
chunkSizeWarningLimit: 1000, // 单位为 KB
analyze: true, // 这将打开包分析器
},
nitro: {
prerender: {
crawlLinks: true,
routes: ["/workflow"], // 添加需 prerender 的路径
},
},
});