-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
executable file
·111 lines (105 loc) · 3.41 KB
/
Copy pathvite.config.ts
File metadata and controls
executable file
·111 lines (105 loc) · 3.41 KB
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import UnoCSS from 'unocss/vite'
import Components from 'unplugin-vue-components/vite';
import {PrimeVueResolver} from '@primevue/auto-import-resolver';
const UrlBase = '/swot/'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
UnoCSS(),
Components({
resolvers: [
PrimeVueResolver()
]
}),
],
resolve: {
alias: {
'@src': path.resolve(__dirname, 'src'),
'@api': path.resolve(__dirname, 'src', 'api'),
'@assets': path.resolve(__dirname, 'src', 'assets'),
'@components': path.resolve(__dirname, 'src', 'components'),
'@config': path.resolve(__dirname, 'src', 'config'),
'@data': path.resolve(__dirname, 'src', 'data'),
'@directives': path.resolve(__dirname, 'src', 'directives'),
'@filters': path.resolve(__dirname, 'src', 'filters'),
'@hooks': path.resolve(__dirname, 'src', 'hooks'),
'@layout': path.resolve(__dirname, 'src', 'layout'),
'@layouts': path.resolve(__dirname, 'src', 'layouts'),
'@locale': path.resolve(__dirname, 'src', 'locale'),
'@mock': path.resolve(__dirname, 'src', 'mock'),
'@views': path.resolve(__dirname, 'src', 'views'),
'@router': path.resolve(__dirname, 'src', 'router'),
'@store': path.resolve(__dirname, 'src', 'store'),
'@stores': path.resolve(__dirname, 'src', 'stores'),
'@types': path.resolve(__dirname, 'src', 'types'),
'@utils': path.resolve(__dirname, 'src', 'utils'),
'@lib': path.resolve(__dirname, 'src', 'lib'),
'@styles': path.resolve(__dirname, 'src', 'styles'),
'@pages': path.resolve(__dirname, 'src', 'pages'),
'@tabs': path.resolve(__dirname, 'src', 'tabs'),
'@panels': path.resolve(__dirname, 'src', 'panels'),
},
},
build: {
outDir: 'docs',
rollupOptions: {
output: {
manualChunks: {
'SpaCE2025': ['./src/data/SpaCE2025'],
'SpaCE2024': ['./src/data/SpaCE2024'],
'FIE2025': ['./src/data/FIE2025'],
// three: ['three'],
// d3: ['d3'],
lodash: ['lodash'],
tools1: [
// 'axios',
'blueimp-md5',
'clipboard',
// 'dexie',
'file-saver',
// 'jschardet',
'json5',
// 'localforage',
// 'lodash',
'nanoid',
'pako',
'yaml',
'zipson'
],
tools2: [
'axios',
'dexie',
'localforage',
],
// jschardet: ['jschardet'],
openai: ['openai'],
vue: ['vue', 'vue-router', 'vue-i18n', 'pinia'],
vueuse: ['@vueuse/core', '@vueuse/rxjs'],
primevue: ['primevue'],
// transformers: ['@huggingface/transformers'],
// 'kalimah-icons': ['@kalimahapps/vue-icons'],
'markdown-utils': [ // 添加 markdown-utils
'markdown-it',
'remark',
'remark-frontmatter',
'remark-gfm',
'remark-math',
'remark-parse',
'remark-rehype',
'rehype-katex',
'rehype-pretty-code',
'rehype-raw',
'rehype-stringify',
'unified'
],
// formily: ['@formily/core', '@formily/vue'],
}
}
}
},
base: UrlBase,
})