From 89f387786da0e4383cf06ee162526db54971f9cf Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 23 十月 2025 15:21:16 +0800
Subject: [PATCH] fix: s
---
vite.config.ts | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/vite.config.ts b/vite.config.ts
index 1b96ef9..33df6f8 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -2,6 +2,7 @@
import { warpperEnv } from './build';
import { getPluginsList } from './build/plugins';
import { UserConfigExport, ConfigEnv, loadEnv, AliasOptions } from 'vite';
+import dayjs from 'dayjs';
export const projRoot = resolve(__dirname, '..', '..');
export const pkgRoot = resolve(projRoot, 'packages');
@@ -43,6 +44,7 @@
VITE_PROXY_DOMAIN,
VITE_PROXY_DOMAIN_REAL,
VITE_COMPRESSION,
+ VITE_AppType,
} = warpperEnv(loadEnv(mode, root));
return {
@@ -90,12 +92,17 @@
}
: {},
},
- plugins: getPluginsList(command, { VITE_LEGACY, VITE_COMPRESSION }),
+ plugins: getPluginsList(command, { VITE_LEGACY, VITE_COMPRESSION, VITE_AppType }),
define: {
__INTLIFY_PROD_DEVTOOLS__: false,
},
build: {
- outDir: `dist/dist-12333Governmentback-${mode}`,
+ outDir:
+ mode === 'staging'
+ ? `dist/dist-12333Governmentback-${VITE_AppType}-${mode}`
+ : `dist/${dayjs().format(
+ 'YYYY-MM-DD'
+ )}/dist-12333Governmentback-${VITE_AppType}-${mode}-${dayjs().format('YYYYMMDD')}`,
},
optimizeDeps: {
include: [
--
Gitblit v1.9.1