Merge pull request #2542 from bluewave-labs/fix/process-env
fix: use process.env
This commit is contained in:
1 file changed
+2
-4
@@ -4,10 +4,8 @@ import svgr from "vite-plugin-svgr";
|
|||||||
import { execSync } from "child_process";
|
import { execSync } from "child_process";
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
const env = loadEnv(mode, process.cwd(), "");
|
let version = process.env.VITE_APP_VERSION;
|
||||||
let version = env.VITE_APP_VERSION;
|
if (!version || version === "unknown") {
|
||||||
|
|
||||||
if (!version) {
|
|
||||||
try {
|
try {
|
||||||
version = execSync("git describe --tags --abbrev=0").toString().trim();
|
version = execSync("git describe --tags --abbrev=0").toString().trim();
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Reference in new issue
Block a user