GitHub Pages / build (push) Canceled after 0s
GitHub Pages / deploy (push) Canceled after 0s
Docker image / meta (push) Successful in 24s
Docs Docker image / meta (push) Successful in 7s
Docker image / build (amd64, linux/amd64, ubuntu-latest) (push) Failing after 59s
Docs Docker image / build (amd64, linux/amd64, ubuntu-latest) (push) Failing after 30s
Docker image / merge (push) Canceled after 0s
Docs Docker image / merge (push) Canceled after 0s
Docker image / build (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Docs Docker image / build (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import { readFileSync } from "node:fs";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
import { parseChangelog } from "./src/lib/release";
|
|
|
|
const webDir = dirname(fileURLToPath(import.meta.url));
|
|
const localVersion = readFileSync(resolve(webDir, "../VERSION"), "utf8").trim() || "dev";
|
|
const localChangelog = readFileSync(resolve(webDir, "../CHANGELOG.md"), "utf8");
|
|
|
|
export default defineConfig({
|
|
base: process.env.VITE_BASE || "/",
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve(webDir, "src"),
|
|
},
|
|
},
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(localVersion),
|
|
__APP_RELEASES__: JSON.stringify(parseChangelog(localChangelog)),
|
|
},
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 3000,
|
|
proxy: {
|
|
"/admin": {
|
|
target: "http://127.0.0.1:3003",
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|