|
|
@@ -16,7 +16,7 @@ export function getStorageShortName() { |
|
|
|
|
|
|
|
export function getAppEnvConfig() { |
|
|
|
const ENV_NAME = getConfigFileName(import.meta.env); |
|
|
|
|
|
|
|
|
|
|
|
const ENV = (import.meta.env.DEV |
|
|
|
? // Get the global configuration (the configuration will be extracted independently when packaging) |
|
|
|
(import.meta.env as unknown as GlobEnvConfig) |
|
|
@@ -45,39 +45,17 @@ export function getAppEnvConfig() { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: Development mode |
|
|
|
*/ |
|
|
|
export const devMode = 'development'; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: Production mode |
|
|
|
*/ |
|
|
|
export const prodMode = 'production'; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: Get environment variables |
|
|
|
* @returns: |
|
|
|
* @example: |
|
|
|
*/ |
|
|
|
export function getEnv(): string { |
|
|
|
return import.meta.env.MODE; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: Is it a development mode |
|
|
|
* @returns: |
|
|
|
* @example: |
|
|
|
*/ |
|
|
|
export function isDevMode(): boolean { |
|
|
|
return import.meta.env.DEV; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: Is it a production mode |
|
|
|
* @returns: |
|
|
|
* @example: |
|
|
|
*/ |
|
|
|
export function isProdMode(): boolean { |
|
|
|
return import.meta.env.PROD; |
|
|
|
} |