Update
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import child_process from "child_process";
|
||||
import legacy from "@vitejs/plugin-legacy";
|
||||
import os from "os";
|
||||
|
||||
/**
|
||||
* @type {import('vite').UserConfig}
|
||||
@ -7,11 +8,12 @@ import legacy from "@vitejs/plugin-legacy";
|
||||
const config = {
|
||||
base: "./",
|
||||
define: {
|
||||
__APP_VERSION: child_process
|
||||
__APP_VERSION__: `"${child_process
|
||||
.execSync("git rev-parse --short HEAD")
|
||||
.toString()
|
||||
.replace("\n", ""),
|
||||
__APP_BUILD_TIME: Math.floor(Date.now() / 1000),
|
||||
.replace("\n", "")}"`,
|
||||
__APP_BUILD_TIME__: Math.floor(Date.now() / 1000),
|
||||
__APP_BUILD_MACHINE__:`"${os.hostname}"`
|
||||
},
|
||||
plugins: [
|
||||
legacy({
|
||||
|
||||
Reference in New Issue
Block a user