48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
|
||
|
|
// https://vite.dev/config/
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [vue()],
|
||
|
|
server: {
|
||
|
|
proxy: {
|
||
|
|
'/api': {
|
||
|
|
target: 'http://localhost:8000',
|
||
|
|
changeOrigin: true,
|
||
|
|
configure: (proxy) => {
|
||
|
|
const p = proxy as any
|
||
|
|
p.timeout = 120000
|
||
|
|
p.proxyTimeout = 120000
|
||
|
|
},
|
||
|
|
},
|
||
|
|
'/config': {
|
||
|
|
target: 'http://localhost:8000',
|
||
|
|
changeOrigin: true,
|
||
|
|
configure: (proxy) => {
|
||
|
|
const p = proxy as any
|
||
|
|
p.timeout = 120000
|
||
|
|
p.proxyTimeout = 120000
|
||
|
|
},
|
||
|
|
},
|
||
|
|
'/md': {
|
||
|
|
target: 'http://localhost:8000',
|
||
|
|
changeOrigin: true,
|
||
|
|
configure: (proxy) => {
|
||
|
|
const p = proxy as any
|
||
|
|
p.timeout = 120000
|
||
|
|
p.proxyTimeout = 120000
|
||
|
|
},
|
||
|
|
},
|
||
|
|
'/refresh.js': {
|
||
|
|
target: 'http://localhost:8000',
|
||
|
|
changeOrigin: true,
|
||
|
|
configure: (proxy) => {
|
||
|
|
const p = proxy as any
|
||
|
|
p.timeout = 120000
|
||
|
|
p.proxyTimeout = 120000
|
||
|
|
},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|