Files
blog/apps/frontend/vite.config.ts
T
2026-09-06 23:29:00 -04:00

22 lines
535 B
TypeScript

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/, ""),
},
},
},
}));