| import path from "node:path" |
| import { defineConfig } from "vite" |
| import react from "@vitejs/plugin-react" |
| import tailwindcss from "@tailwindcss/vite" |
|
|
| |
| |
| export default defineConfig({ |
| plugins: [react(), tailwindcss()], |
| resolve: { |
| alias: { "@": path.resolve(__dirname, "./src") }, |
| }, |
| server: { |
| port: 5173, |
| proxy: { |
| "/gradio_api": { target: "http://127.0.0.1:7860", changeOrigin: true, ws: true }, |
| "/media": { target: "http://127.0.0.1:7860", changeOrigin: true }, |
| "/config": { target: "http://127.0.0.1:7860", changeOrigin: true }, |
| "/upload": { target: "http://127.0.0.1:7860", changeOrigin: true }, |
| }, |
| }, |
| build: { |
| outDir: "dist", |
| emptyOutDir: true, |
| }, |
| }) |
|
|