generated from nhcarrigan/template
cd12d4dbec
Displays the app version below the Elysium title in the sidebar. Removes the separate client/API version cards from the About panel. Also fixes the Vite dev proxy port to match the API server.
27 lines
568 B
TypeScript
27 lines
568 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
const { version: WEB_VERSION } = JSON.parse(
|
|
readFileSync("./package.json", "utf-8"),
|
|
) as { version: string };
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__WEB_VERSION__: JSON.stringify(WEB_VERSION),
|
|
},
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:3898",
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
},
|
|
});
|