Spaces:
Sleeping
Sleeping
| import { defineConfig } from "vite"; | |
| import react from "@vitejs/plugin-react"; | |
| import path from "path"; | |
| export default defineConfig({ | |
| plugins: [react()], | |
| resolve: { | |
| alias: { | |
| "@": path.resolve(__dirname, "./src"), | |
| }, | |
| }, | |
| build: { | |
| outDir: "dist", | |
| emptyOutDir: true, | |
| rollupOptions: { | |
| cache: true, | |
| output: { | |
| manualChunks: { | |
| vendor: ["react", "react-dom"], | |
| shadcn: [ | |
| "@radix-ui/react-dialog", | |
| "cmdk", | |
| "@radix-ui/react-tabs", | |
| "@radix-ui/react-accordion", | |
| ], | |
| query: ["@tanstack/react-query"], | |
| }, | |
| }, | |
| }, | |
| }, | |
| server: { | |
| host: "0.0.0.0", | |
| port: 3001, | |
| proxy: { | |
| "/api": { | |
| target: process.env.VITE_API_URL || "http://127.0.0.1:5280", | |
| changeOrigin: true, | |
| secure: false, | |
| timeout: 60000, | |
| }, | |
| "/auth": { | |
| target: process.env.VITE_API_URL || "http://127.0.0.1:5280", | |
| changeOrigin: true, | |
| secure: false, | |
| timeout: 60000, | |
| }, | |
| }, | |
| }, | |
| }); | |