tianji/src/client/vite.config.ts
2024-01-29 19:58:51 +08:00

28 lines
554 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
root: __dirname,
plugins: [react()],
build: {
outDir: '../server/public',
},
clearScreen: false,
server: {
proxy: {
'/socket.io': {
target: 'ws://localhost:12345',
changeOrigin: true,
ws: true,
},
'/trpc': {
target: 'http://localhost:12345',
},
'/api/workspace': {
target: 'http://localhost:12345',
},
},
},
});