generated from dishait/vuepress-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
65 lines (61 loc) · 1.36 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
import {
genPrerenderRoutesSync,
createDefaultGenPrerenderRoutesSyncOptions as defaultOptions
} from 'nuxt3-intelligence'
const routes = genPrerenderRoutesSync(defaultOptions())
const hour = 60 * 60
routes.push('/sitemap.xml', '/config')
export default defineNuxtConfig({
extends: '@nuxt-themes/docus',
modules: [
'nuxt-size',
'@unocss/nuxt',
'@nuxt/devtools',
'@nuxtjs/robots',
'@nuxtjs/fontaine',
'@nuxt/image-edge',
'./modules/beastcss'
],
app: {
head: {
meta: [
{ charset: 'utf-8' },
{ name: 'keywords', content: '编程快速入门视频' },
{ name: 'keywords', content: '帮助你快速开始编程的教程' },
{ name: 'description', content: `一个编程快速入门的视频栏目,帮助你快速开始编程` },
],
htmlAttrs: {
lang: 'zh-CN'
}
}
},
unocss: {
uno: true,
attributify: true
},
experimental: {
asyncEntry: true, // 异步入口
watcher: "parcel", // 提高 windows watch 速度
payloadExtraction: false, // 禁止 payload 提取
crossOriginPrefetch: true, // 跨域预取,加快外链的速度
},
vite: {
define: {
__VUE_OPTIONS_API__: false // 明确不使用 options api
}
},
sourcemap: false,
typescript: {
shim: false
},
routeRules: {
'/**': { swr: 6 * hour, prerender: true}
},
nitro: {
minify: true,
prerender: {
routes,
crawlLinks: true
}
}
})