Files
Neo-ZQYY/apps/admin-web/vite.config.ts

27 lines
520 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
proxy: {
// API 代理到后端
"/api": {
target: "http://localhost:8000",
changeOrigin: true,
},
// WebSocket 代理
"/ws": {
target: "ws://localhost:8000",
ws: true,
},
},
},
test: {
globals: true,
environment: "jsdom",
setupFiles: [],
},
});