import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; import tailwindcss from "@tailwindcss/vite"; // https://vite.dev/config/ export default defineConfig(({ isSsrBuild }) => ({ plugins: [react(), tailwindcss()], build: { // Static files belong with the client build only. copyPublicDir: !isSsrBuild, }, server: { proxy: { "/api": { target: "http://localhost:3000", changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), }, }, }, }));