From 27f846dc2415f9a962c09e45b5447ad0f9106e2b Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期四, 16 十月 2025 17:07:03 +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