mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
28 lines
640 B
TypeScript
28 lines
640 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
server: {
|
|
proxy: {
|
|
'/trpc': {
|
|
target: process.env.API_TARGET || 'http://localhost:3000',
|
|
changeOrigin: false,
|
|
xfwd: true,
|
|
},
|
|
'/api': {
|
|
target: process.env.API_TARGET || 'http://localhost:3000',
|
|
changeOrigin: false,
|
|
xfwd: true,
|
|
},
|
|
'/socket.io': {
|
|
target: process.env.API_TARGET || 'ws://localhost:3000',
|
|
changeOrigin: false,
|
|
ws: true,
|
|
xfwd: true,
|
|
},
|
|
},
|
|
},
|
|
})
|