fix(vue): make useAppConfig reactive

Resolves #3952

Co-Authored-By: Hugo Richard <hugo.richard@epitech.eu>
This commit is contained in:
Benjamin Canac
2025-05-12 15:04:41 +02:00
parent c63d2f380a
commit 869c0708bd
2 changed files with 5 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
import { reactive } from 'vue'
import appConfig from '#build/app.config'
export const useAppConfig = () => appConfig
const _appConfig = reactive(appConfig)
export const useAppConfig = () => _appConfig

View File

@@ -9,6 +9,7 @@ import { useColorMode as useColorModeVueUse } from '@vueuse/core'
export { useHead } from '@unhead/vue'
export { useRoute, useRouter } from 'vue-router'
export { useAppConfig } from './composables/useAppConfig'
export { defineShortcuts } from '../composables/defineShortcuts'
export { defineLocale } from '../composables/defineLocale'
export { useLocale } from '../composables/useLocale'
@@ -30,8 +31,6 @@ export const useColorMode = () => {
}
}
export const useAppConfig = () => appConfig
export const useCookie = <T = string>(
_name: string,
_options: Record<string, any> = {}