Files
MrAlders0n 39641b6339 ui: footer version from package.json plus a batch of interaction fixes
- footer read 'v0.1' forever; it's injected from package.json at build
  time now
- region picker shows 'Failed to load' instead of an eternal Loading
  when /iatas errors
- selecting text in a modal and releasing over the backdrop no longer
  closes it (close requires the press to start on the backdrop)
- Escape in a dropdown inside the mobile filter sheet closes just the
  dropdown, not the whole sheet
- Shift+Tab right after a modal opens wraps to the last control instead
  of escaping the focus trap
- formatCount rolls 999,999 over to 1M instead of printing 1000k
- TABS list moved to lib/constants so AppShell only exports components
2026-06-10 07:03:16 -04:00

38 lines
1.1 KiB
TypeScript

/// <reference types="vitest/config" />
import { readFileSync } from "node:fs";
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
const pkg = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8")) as { version: string };
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "VITE_");
// set VITE_DEV_PROXY to point at a running beacon-server instance
const proxyTarget = env.VITE_DEV_PROXY;
return {
plugins: [react(), tailwindcss()],
define: { __APP_VERSION__: JSON.stringify(pkg.version) },
server: proxyTarget
? {
proxy: {
"/api": { target: proxyTarget, changeOrigin: true, secure: true },
"/ws": {
target: proxyTarget.replace(/^http/, "ws"),
changeOrigin: true,
secure: true,
ws: true,
headers: { Origin: proxyTarget },
},
},
}
: undefined,
test: {
globals: true,
environment: "jsdom",
setupFiles: "./tests/setup.ts",
},
};
});