-
Notifications
You must be signed in to change notification settings - Fork 20
/
nuxt.config.ts
113 lines (113 loc) · 2.67 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
export default defineNuxtConfig({
app: {
keepalive: true,
head: {
viewport: 'width=device-width,initial-scale=1,viewport-fit=cover',
bodyAttrs: {
class: 'overflow-x-hidden',
},
link: [
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
{ rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' },
],
meta: [
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
// open graph social image
{ property: 'og:title', content: '某星签到助手' },
{ property: 'og:description', content: '摆脱客户端繁琐的签到流程,让签到不再是你的烦恼。' },
{ property: 'og:type', content: 'website' },
{ property: 'og:image', content: '/chaoxing-og.png' },
{ property: 'og:image:width', content: '2000' },
{ property: 'og:image:height', content: '1000' },
{ property: 'og:site_name', content: '某星签到助手' },
],
},
pageTransition: { name: 'page', mode: 'out-in' },
layoutTransition: { name: 'layout', mode: 'out-in' },
},
runtimeConfig: {
im: {
initConnect: false,
},
},
modules: [
'@vueuse/nuxt',
'@unocss/nuxt',
'@nuxtjs/color-mode',
'@nuxt/content',
['@pinia/nuxt', {
autoImports: ['defineStore', 'definePiniaStore'],
}],
'pinia-plugin-persistedstate/nuxt',
'@sidebase/nuxt-auth',
'@huntersofbook/naive-ui-nuxt',
'@nuxt/icon',
'@nuxt/devtools',
],
imports: {
dirs: [
'composables/**/*',
'stores/**/*',
],
},
components: [
{
path: '~/components/global',
global: true,
},
{
path: '~/components',
extensions: ['vue'],
},
],
colorMode: {
classSuffix: '',
},
unocss: {
uno: true,
icons: true,
attributify: true,
preflight: false,
},
css: ['~/assets/css/main.css'],
content: {
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark',
sepia: 'monokai',
},
},
},
routeRules: {
'/help': { static: true },
'/api/**': { cors: true },
'/manifest.webmanifest': {
headers: {
'Content-Type': 'application/manifest+json',
'Cache-Control': 'public, max-age=0, must-revalidate',
},
},
},
auth: {
isEnabled: true,
globalAppMiddleware: {
isEnabled: true,
}
},
build: {
transpile: ['punycode'],
},
typescript: {
shim: false,
},
experimental: {
renderJsonPayloads: true,
asyncContext: true,
},
devtools: {
enabled: true,
vscode: {},
},
})