import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import fs from "fs"; import path, { join } from "path"; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], resolve: { alias: { "@": join(__dirname, "./src"), }, }, server: { proxy: { "/api": { target: "http://120.48.128.161:30030", changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), }, }, }, })