-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
99 lines (87 loc) · 2.18 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import graphqlLoader from "vite-plugin-graphql-loader";
import codegen from "vite-plugin-graphql-codegen";
export default defineNuxtConfig({
ssr: false,
routeRules: {
"/**": { ssr: false },
},
devtools: { enabled: true },
modules: [
"nuxt-icon",
"@nuxt/ui",
"@nuxtjs/tailwindcss",
"@nuxtjs/device",
"@nuxtjs/apollo",
"shadcn-nuxt",
"dayjs-nuxt",
],
pages: true,
components: true,
vite: {
plugins: [
graphqlLoader(),
codegen({
runOnStart: true,
runOnBuild: false,
config: {
overwrite: true,
generates: {
"generated/graphql/": {
schema: process.env.GQL_HOST,
documents: "./queries/default/*.gql",
preset: "client",
plugins: ["typescript", "typescript-operations"],
},
"generated/analytic/": {
schema: process.env.GQL_ANALYTIC_HOST,
documents: "./queries/analytic/*.gql",
preset: "client",
plugins: ["typescript", "typescript-operations"],
},
},
},
}),
],
},
apollo: {
clients: {
default: {
httpEndpoint: process.env.GQL_HOST || "http://localhost:3000/graphql",
browserHttpEndpoint: process.env.GQL_HOST_BROWSER,
connectToDevTools: true,
defaultOptions: {
query: {
fetchPolicy: "no-cache",
},
},
inMemoryCacheOptions: {
resultCaching: false,
},
},
analytic: {
httpEndpoint:
process.env.GQL_ANALYTIC_HOST || "http://localhost:3000/graphql",
browserHttpEndpoint: process.env.GQL_ANALYTIC_HOST_BROWSER,
connectToDevTools: true,
defaultOptions: {
query: {
fetchPolicy: "no-cache",
pollInterval: 1000,
},
},
inMemoryCacheOptions: {
resultCaching: false,
},
},
},
},
ui: {
icons: ["mage", "bxl"],
},
shadcn: {
componentDir: "./components/ui",
prefix: "Sha",
},
compatibilityDate: "2024-07-29",
});