-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvite.config.js
38 lines (38 loc) · 859 Bytes
/
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const { resolve } = require('path')
import { svgBuilder } from './src/utils/ceater'
import vueJsx from '@vitejs/plugin-vue-jsx'
export default defineConfig({
plugins: [vue(), svgBuilder('./src/icons/svg/'), vueJsx()],
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, 'src')
}
]
},
server: {
host: 'localhost',
port: 8080,
open: true,
cors: true,
proxy: {
'/api': {
// target: 'http://121.41.67.22:88',
target: 'http://121.41.67.22:88',
changeOrigin: true
// rewrite: (path) => path.replace(/^\/api/, ''),
}
}
},
/* 打包配置 */
base: './',
build: {
brotliSize: false,
emptyOutDir: false,
outDir: 'dist',
assetsDir: 'static'
}
})