fix: 'VITE_GLOB_APP_TITLE' of 't' as it is undefined

pull/40/MERGE
xingyu 2023-11-14 09:58:51 +08:00
parent 791e5ed40e
commit b4e38731c0
3 changed files with 12 additions and 18 deletions

View File

@ -50,7 +50,7 @@
"@iconify/iconify": "^3.1.1", "@iconify/iconify": "^3.1.1",
"@videojs-player/vue": "^1.0.0", "@videojs-player/vue": "^1.0.0",
"@vue/runtime-core": "^3.3.8", "@vue/runtime-core": "^3.3.8",
"@vueuse/core": "^10.6.0", "@vueuse/core": "^10.6.1",
"@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/core": "^3.0.4",
"ant-design-vue": "^4.0.7", "ant-design-vue": "^4.0.7",
"axios": "^1.6.1", "axios": "^1.6.1",

View File

@ -21,8 +21,8 @@ dependencies:
specifier: ^3.3.8 specifier: ^3.3.8
version: 3.3.8 version: 3.3.8
'@vueuse/core': '@vueuse/core':
specifier: ^10.6.0 specifier: ^10.6.1
version: 10.6.0(vue@3.3.8) version: 10.6.1(vue@3.3.8)
'@zxcvbn-ts/core': '@zxcvbn-ts/core':
specifier: ^3.0.4 specifier: ^3.0.4
version: 3.0.4 version: 3.0.4
@ -3382,24 +3382,24 @@ packages:
/@vue/shared@3.3.8: /@vue/shared@3.3.8:
resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==} resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==}
/@vueuse/core@10.6.0(vue@3.3.8): /@vueuse/core@10.6.1(vue@3.3.8):
resolution: {integrity: sha512-+Yee+g9+9BEbvkyGdn4Bf4yZx9EfocAytpV2ZlrlP7xcz+qznLmZIDqDroTvc5vtMkWZicisgEv8dt3+jL+HQg==} resolution: {integrity: sha512-Pc26IJbqgC9VG1u6VY/xrXXfxD33hnvxBnKrLlA2LJlyHII+BSrRoTPJgGYq7qZOu61itITFUnm6QbacwZ4H8Q==}
dependencies: dependencies:
'@types/web-bluetooth': 0.0.20 '@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 10.6.0 '@vueuse/metadata': 10.6.1
'@vueuse/shared': 10.6.0(vue@3.3.8) '@vueuse/shared': 10.6.1(vue@3.3.8)
vue-demi: 0.14.6(vue@3.3.8) vue-demi: 0.14.6(vue@3.3.8)
transitivePeerDependencies: transitivePeerDependencies:
- '@vue/composition-api' - '@vue/composition-api'
- vue - vue
dev: false dev: false
/@vueuse/metadata@10.6.0: /@vueuse/metadata@10.6.1:
resolution: {integrity: sha512-mzKHkHoiK6xVz01VzQjM2l6ofUanEaofgEGPgDHcAzlvOTccPRTIdEuzneOUTYxgfm1vkDikS6rtrEw/NYlaTQ==} resolution: {integrity: sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==}
dev: false dev: false
/@vueuse/shared@10.6.0(vue@3.3.8): /@vueuse/shared@10.6.1(vue@3.3.8):
resolution: {integrity: sha512-0t4MVE18sO+/4Gh0jfeOXBTjKeV4606N9kIrDOLPjFl8Rwnlodn+QC5A4LfJuysK7aOsTMjF3KnzNeueaI0xlQ==} resolution: {integrity: sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==}
dependencies: dependencies:
vue-demi: 0.14.6(vue@3.3.8) vue-demi: 0.14.6(vue@3.3.8)
transitivePeerDependencies: transitivePeerDependencies:

View File

@ -1,5 +1,4 @@
import pkg from '../../package.json' import pkg from '../../package.json'
import { getConfigFileName } from '../../build/getConfigFileName'
import type { GlobEnvConfig } from '@/types/config' import type { GlobEnvConfig } from '@/types/config'
import { warn } from '@/utils/log' import { warn } from '@/utils/log'
@ -15,12 +14,7 @@ export function getStorageShortName() {
} }
export function getAppEnvConfig() { export function getAppEnvConfig() {
const ENV_NAME = getConfigFileName(import.meta.env) const ENV = import.meta.env as unknown as GlobEnvConfig
// Get the global configuration (the configuration will be extracted independently when packaging)
const ENV = (import.meta.env.DEV
? (import.meta.env as unknown as GlobEnvConfig)
: window[ENV_NAME as any]) as unknown as GlobEnvConfig
const { const {
VITE_GLOB_APP_TITLE, VITE_GLOB_APP_TITLE,