From b3d011a1f0795e2e9164806881c039d745fe4097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B4=9B=E5=B8=8C=E9=9B=85?= Date: Fri, 26 Apr 2024 22:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=9A=B4=E9=9C=B2=E7=9A=84?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 44fc01e..689a2da 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,9 +24,9 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => { //define global var GLOBAL_STRING: JSON.stringify('i am global var from vite.config.js define'), GLOBAL_VAR: { test: 'i am global var from vite.config.js define' }, - 'import.meta.env.TAG_TIMESTAMP': process.env.TAG_TIMESTAMP, - 'import.meta.env.BUILD_DISPLAY_NAME': process.env.BUILD_DISPLAY_NAME, - 'import.meta.env.GIT_COMMIT': process.env.GIT_COMMIT + 'import.meta.env.TAG_TIMESTAMP': JSON.stringify(process.env.TAG_TIMESTAMP), + 'import.meta.env.BUILD_DISPLAY_NAME': JSON.stringify(process.env.BUILD_DISPLAY_NAME), + 'import.meta.env.GIT_COMMIT': JSON.stringify(process.env.GIT_COMMIT) }, clearScreen: false, //设为 false 可以避免 Vite 清屏而错过在终端中打印某些关键信息 server: {