The backend status endpoint already reports the shared git hash and environment, so the SPA no longer needs its own baked copy.
25 lines
551 B
TypeScript
25 lines
551 B
TypeScript
import { fileURLToPath, URL } from "node:url";
|
|
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
const backend = process.env.VITE_BACKEND ?? "http://127.0.0.1:8000";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": backend,
|
|
"/media": backend,
|
|
"/admin": backend,
|
|
},
|
|
},
|
|
});
|