jinmao88
2023-08-10 9650122736475940b93fea5c59955514388f914e
fix: ci
2个文件已修改
8 ■■■■ 已修改文件
internal/vite-config/src/plugins/appConfig.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/env.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
internal/vite-config/src/plugins/appConfig.ts
@@ -27,8 +27,8 @@
  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 @@
    }
    return result.join('').toUpperCase();
  }
  return `__PRODUCTION__${strToHex(title) || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '');
};
src/utils/env.ts
@@ -20,13 +20,10 @@
    }
    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