init
This commit is contained in:
121 files changed
+17641
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// In development the UI runs on :5173 and the API on :8000, so /api is proxied.
|
||||
// In production both are served from the same origin (the backend serves the
|
||||
// built files), which is why every request in the app is a relative path.
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.VITE_API_TARGET || "http://localhost:8000",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: { outDir: "dist", sourcemap: false },
|
||||
});
|
||||
Reference in new issue
Block a user