TTime/frontend/vite.config.ts

23 lines
514 B
TypeScript
Raw Permalink Normal View History

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// build: {
// outDir: '../server/public' // Override default outDir('dist')
// },
server: {
port: 3000,
open: true,
proxy: {
"/api": {
target: "http://localhost:8080/api",
changeOrigin: true,
secure: false,
rewrite: (path): string => path.replace(/^\/api/, ""),
},
},
},
});