forked from Mirrors/elk
chore: update
This commit is contained in:
parent
7ab17001f0
commit
39249e378f
2 changed files with 5 additions and 1 deletions
|
@ -24,4 +24,7 @@ export default defineNuxtConfig({
|
||||||
'postcss-nested': {},
|
'postcss-nested': {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
runtimeConfig: {
|
||||||
|
registedAppsUrl: process.env.APPS_JSON_URL || 'http://localhost:3000/registered-apps.json',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,8 @@ import type { AppInfo } from '~/types'
|
||||||
|
|
||||||
export const registeredApps: Record<string, AppInfo> = {}
|
export const registeredApps: Record<string, AppInfo> = {}
|
||||||
|
|
||||||
const promise = $fetch(process.env.APPS_JSON_URL || 'http://localhost:3000/registered-apps.json')
|
const runtimeConfig = useRuntimeConfig()
|
||||||
|
const promise = $fetch(runtimeConfig.registedAppsUrl)
|
||||||
.then(r => Object.assign(registeredApps, r))
|
.then(r => Object.assign(registeredApps, r))
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
if (process.dev)
|
if (process.dev)
|
||||||
|
|
Loading…
Reference in a new issue