-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
96 lines (87 loc) · 1.84 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
import autoImport from 'unplugin-auto-import/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import components from 'unplugin-vue-components/vite'
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
app: {
head: {
title: 'serval',
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
}
},
future: {
compatibilityVersion: 4
},
hub: {
database: true
},
nitro: {
experimental: {
openAPI: true
}
},
routeRules: {
'/admin': { redirect: '/admin/users' }
},
auth: {
baseURL: '/api/auth',
provider: {
type: 'local',
session: {
dataType: {
id: 'string',
username: 'string',
role: 'string'
}
},
token: {
maxAgeInSeconds: 31_556_952
},
endpoints: {
signIn: { path: '/login', method: 'post' },
signOut: { path: '/logout', method: 'post' },
signUp: { path: '/register', method: 'post' },
getSession: { path: '/session', method: 'get' }
}
},
globalAppMiddleware: true
},
vite: {
plugins: [
autoImport({
imports: [
{
'naive-ui': [
'useDialog',
'useMessage',
'useNotification',
'useLoadingBar'
]
}
]
}),
components({
resolvers: [NaiveUiResolver()]
})
],
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
additionalData: `
@use "sass:math";
@use "~/assets/styles/globals.scss" as globals;
`
}
}
}
},
modules: [
'@nuxt/icon',
'@nuxt/fonts',
'@sidebase/nuxt-auth',
'@nuxthub/core',
'nuxtjs-naive-ui'
]
})