pass hub version through html and update dependencies

- Changed Vite configuration to replace version during development.
This commit is contained in:
henrygd
2025-03-13 02:15:03 -04:00
parent 1d7c0ebc27
commit ae22334645
8 changed files with 195 additions and 323 deletions

View File

@@ -2,6 +2,7 @@ import { defineConfig } from "vite"
import path from "path"
import react from "@vitejs/plugin-react-swc"
import { lingui } from "@lingui/vite-plugin"
import { version } from "./package.json"
export default defineConfig({
base: "./",
@@ -10,6 +11,13 @@ export default defineConfig({
plugins: [["@lingui/swc-plugin", {}]],
}),
lingui(),
{
name: "replace version in index.html during dev",
apply: "serve",
transformIndexHtml(html) {
return html.replace("{{V}}", version)
},
},
],
esbuild: {
legalComments: "external",