-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
105 lines (94 loc) · 1.99 KB
/
nuxt.config.ts
File metadata and controls
105 lines (94 loc) · 1.99 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
101
102
103
104
105
import { defineNuxtConfig } from "nuxt/config";
import { env } from "std-env";
export default defineNuxtConfig({
future: {
compatibilityVersion: 5,
},
compatibilityDate: "2026-02-16",
routeRules: {
"/api/**": {
cors: true,
},
"/sw.js": {
ssr: false,
},
"/admin/**": {
ssr: false,
},
"/dashboard/**": {
ssr: false,
},
},
nitro: {
future: {
nativeSWR: true,
},
rollupConfig: {
external: ["pg-native", "cloudflare:sockets", "@react-email/render"],
},
cloudflare: {
deployConfig: true,
nodeCompat: true,
},
},
vite: {
optimizeDeps: {
include: [
"@vue/devtools-core",
"@vue/devtools-kit",
"better-auth/vue",
"better-auth/client/plugins",
"@better-auth/api-key/client",
"zod",
"@tanstack/table-core",
"@unovis/vue",
"date-fns",
"@internationalized/date",
],
},
},
modules: ["@nuxt/ui", "@vueuse/nuxt", "@nuxtjs/i18n", "@nuxt/content"],
css: ["~/assets/css/main.css"],
content: {
experimental: { sqliteConnector: "native" },
},
i18n: {
defaultLocale: "en",
langDir: "locales",
locales: [
{
code: "en",
language: "en",
file: "en.json",
name: "English",
},
{
code: "zh_cn",
language: "zh_cn",
file: "zh_cn.json",
name: "简体中文",
},
],
detectBrowserLanguage: {
cookieCrossOrigin: true,
},
strategy: "no_prefix",
differentDomains: false,
},
ui: {
experimental: {
componentDetection: true,
},
},
hooks: {
async "build:before"() {
// Skip migration if explicitly disabled (for Docker builds)
if (env.SKIP_MIGRATE === "true") {
console.log("ℹ️ Skipping database migration (SKIP_MIGRATE=true)");
return;
}
const { migrate } = await import("./scripts/migrate");
await migrate();
},
},
});