From 9650122736475940b93fea5c59955514388f914e Mon Sep 17 00:00:00 2001 From: jinmao88 <50581550+jinmao88@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:52:57 +0800 Subject: [PATCH] fix: ci --- internal/vite-config/src/plugins/appConfig.ts | 5 ++--- src/utils/env.ts | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/vite-config/src/plugins/appConfig.ts b/internal/vite-config/src/plugins/appConfig.ts index 98594b1a..7d506623 100644 --- a/internal/vite-config/src/plugins/appConfig.ts +++ b/internal/vite-config/src/plugins/appConfig.ts @@ -27,8 +27,8 @@ async function createAppConfigPlugin({ return { name: PLUGIN_NAME, async configResolved(_config) { - let appTitle = _config?.env?.VITE_GLOB_APP_TITLE ?? ''; - appTitle = appTitle.replace(/\s/g, '_').replace(/-/g, '_'); + const appTitle = _config?.env?.VITE_GLOB_APP_TITLE ?? ''; + // appTitle = appTitle.replace(/\s/g, '_').replace(/-/g, '_'); publicPath = _config.base; source = await getConfigSource(appTitle); }, @@ -82,7 +82,6 @@ const getVariableName = (title: string) => { } return result.join('').toUpperCase(); } - return `__PRODUCTION__${strToHex(title) || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, ''); }; diff --git a/src/utils/env.ts b/src/utils/env.ts index a169073d..abc64e45 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -20,13 +20,10 @@ const getVariableName = (title: string) => { } return result.join('').toUpperCase(); } - return `__PRODUCTION__${strToHex(title) || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, ''); }; export function getAppEnvConfig() { - console.log(import.meta.env.VITE_GLOB_APP_TITLE); - const ENV_NAME = getVariableName(import.meta.env.VITE_GLOB_APP_TITLE); console.log(ENV_NAME); const ENV = import.meta.env.DEV