mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 10:46:16 +01:00
pass hub version through html and update dependencies
- Changed Vite configuration to replace version during development.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user