-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
64 lines (59 loc) · 1.86 KB
/
vite.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
import { defineConfig } from 'vite';
import Inspect from 'vite-plugin-inspect'
import UnoCSS from 'unocss/vite'
import { ThumbnailHashImages } from '@nolebase/vitepress-plugin-thumbnail-hash/vite'
import { PageProperties, PagePropertiesMarkdownSection } from '@nolebase/vitepress-plugin-page-properties/vite'
import {repoURL} from './.vitepress/config/site'
import {
GitChangelog,
GitChangelogMarkdownSection,
} from '@nolebase/vitepress-plugin-git-changelog/vite'
import { locales as gitChangeLogLocales } from './.vitepress/config/components/gitchangelog'
import Components from 'unplugin-vue-components/vite';
import { ArcoResolver } from 'unplugin-vue-components/resolvers';
import {excludes} from './.vitepress/config/components/properties'
export default defineConfig(() => {
return {
build : {
chunkSizeWarningLimit: 1024 * 1024 * 10,
},
optimizeDeps: {
include: [
'@nolebase/vitepress-plugin-enhanced-readabilities > @nolebase/ui > @rive-app/canvas',
],
exclude: [
'@nolebase/vitepress-plugin-enhanced-readabilities/client',
'vitepress'
],
},
ssr: {
noExternal: [
'@antv/g2plot',
'@arco-design/web-vue',
'@nolebase/*',
'@arco-design/*'
],
},
plugins: [
Components({
dirs: ['.vitepress/theme/components'],
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
resolvers: [ArcoResolver({ sideEffect: true, resolveIcons: true })]
}),
GitChangelog({
repoURL: () => repoURL,
}),
GitChangelogMarkdownSection({
}),
Inspect(),
UnoCSS(),
ThumbnailHashImages(),
PageProperties(),
PagePropertiesMarkdownSection({
exclude(path:string):boolean{
return excludes.find(b=> path.endsWith(b)) ? true : false;
}
})
],
}
})