Vben
2021-02-25 8a9ca498d70a0a4f66c073fe869fc6d8a3e79a55
src/utils/env.ts
@@ -1,5 +1,8 @@
import type { GlobEnvConfig } from '/@/types/config';
import { useGlobSetting } from '/@/hooks/setting';
import pkg from '../../package.json';
/**
 * Get the global configuration (the configuration will be extracted independently when packaging)
 */
@@ -8,6 +11,12 @@
  return (env as unknown) as GlobEnvConfig;
}
// Generate cache key according to version
export function getStorageShortName() {
  const globSetting = useGlobSetting();
  return `${globSetting.shortName}__${getEnv()}${`__${pkg.version}`}__`.toUpperCase();
}
/**
 * @description: Development model
 */