-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
80 lines (79 loc) · 1.46 KB
/
vite.config.js
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
import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import prismjs from 'vite-plugin-prismjs';
export default defineConfig({
plugins: [
vue(),
prismjs({
languages: [
'bash',
'c',
'cmake',
'cpp',
'css',
'dart',
'django',
'docker',
'go',
'go-module',
'java',
'javascript',
'json',
'latex',
'lua',
'mermaid',
'php',
'python',
'rust',
'scheme',
'sql',
'swift',
'toml',
'typescript',
'yaml',
],
}),
],
define: {
'process.env': {
BACKEND_URL: process.env.BACKEND_URL,
SITE_URL: process.env.SITE_URL,
OVINC_URL: process.env.OVINC_URL,
OVINC_WEB_URL: process.env.OVINC_WEB_URL,
},
},
base: '/',
publicDir: 'public',
server: {
host: process.env.HOST,
port: 8080,
},
css: {
preprocessorOptions:
{
scss:
{
charset: false,
},
},
},
build: {
sourcemap: false,
chunkSizeWarningLimit: 2000,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('markdown')) {
return 'markdown';
}
if (id.includes('arco-design')) {
return 'arco-design';
}
if (id.includes('v-md-editor')) {
return 'v-md-editor';
}
},
},
},
},
});