第四十九章-Vben的获取配置文件名的方法

build\getConfigFileName.ts

/**
 * Get the configuration file variable name
 * @param env
 */
export const getConfigFileName = (env: Record<string, any>) => {
  return (
    `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`
      // ↓换成大写
      .toUpperCase()
      // ↓将空白换成空字符串
      .replace(/\s/g, '')
  );
};

上一章

第四十八章-完善build的utils.ts

下一章

第五十章-Vben动态配置环境变量

# vben 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×