forked from lirongtong/miitvip-vue-admin-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
44 lines (43 loc) · 1.13 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
import path from 'path'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { UserConfig } from 'vite'
const resolve = (dir: string) => path.join(__dirname, dir)
const config: UserConfig = {
resolve: {
alias: {
'/@/': resolve('example'),
'/@src/': resolve('src'),
'makeit-admin-pro': resolve('src'),
'makeit-admin-pro/style': '/src/style.ts',
'makeit-admin-pro/less': '/src/style/miitvip.less'
}
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true
}
}
},
optimizeDeps: {
include: [
'axios', 'vue', 'ant-design-vue', '@ant-design/colors',
'@ant-design/icons-vue', 'screenfull', 'vue-router', 'vuex'
]
},
server: {
proxy: {
'/v1': {
target: 'http://local-account.makeit.vip',
changeOrigin: true
}
}
},
plugins: [vue(), vueJsx()],
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment'
}
}
module.exports = config