generated from tolking/element-admin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
31 lines (29 loc) · 797 Bytes
/
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
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
return {
server: {
host: '0.0.0.0',
proxy: {
'/admin/': env.VITE_PROXY_URL,
},
},
build: {
rollupOptions: {
output: {
inlineDynamicImports: false,
manualChunks: {
'modules-vue': ['vue', 'vue-router'],
'modules-vueuse': ['@vueuse/core'],
'modules-quill': ['quill'],
'modules-element-plus': ['element-plus'],
'modules-element-pro': ['element-pro-components'],
'modules-element-icon': ['@element-plus/icons-vue'],
},
},
},
},
plugins: [vue()],
}
})