-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.js
47 lines (45 loc) · 1.08 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
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import autoprefixer from 'autoprefixer'
const envPrefix = 'APP_'
export default defineConfig({
base: '/',
plugins: [
vue()
],
envPrefix,
resolve: {
alias: {
'@': '/src'
},
extensions: ['.js', '.vue', '.json', '.less', '.css']
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true
}
},
postcss: {
plugins: [
autoprefixer
]
}
},
server: {
host: '127.0.0.1',
port: 3000,
open: true,
proxy: {
// '/iteamdo': { // 使用远端服务时使用
// target: 'http://api.teamdo.com',
// changeOrigin: true
// },
'/iteamdo': { // 本地启动服务端时使用
target: 'http://127.0.0.1:8341',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/iteamdo/, '')
}
}
}
})