-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
67 lines (58 loc) · 1.55 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
const routeRulesProxy = () => {
let proxy_prefix = 'https://cupcake-backend.java.no'
if (process.env.NODE_ENV === 'development') {
proxy_prefix = 'http://127.0.0.1:8080'
}
if ('CUPCAKE_BACKEND' in process.env && process.env.CUPCAKE_BACKEND !== undefined) {
proxy_prefix = process.env.CUPCAKE_BACKEND
}
return {
'/api/**': {
proxy: {
to: `${proxy_prefix}/api/**`
}
},
'/login': {
proxy: {
to: `${proxy_prefix}/login`,
fetchOptions: {redirect: 'manual'}
}
},
'/slackCallback': {
proxy: {
to: `${proxy_prefix}/slackCallback`,
fetchOptions: {redirect: 'manual'}
}
}
}
}
let frontend_host = 'localhost'
if ('CUPCAKE_FRONTEND' in process.env && process.env.CUPCAKE_FRONTEND !== undefined) {
frontend_host = process.env.CUPCAKE_FRONTEND
}
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
future: {
compatibilityVersion: 4,
},
ssr: false,
devtools: {enabled: true},
modules: ['vuetify-nuxt-module'],
routeRules: routeRulesProxy(),
vite: {
server: {
allowedHosts: [
'maximum-whale-singularly.ngrok-free.app',
frontend_host
]
}
},
vuetify: {
vuetifyOptions: {
theme: {
defaultTheme: 'dark'
}
}
}
})