diff --git a/_nuxthub/composables/config.ts b/_nuxthub/composables/config.ts new file mode 100644 index 00000000..6922d488 --- /dev/null +++ b/_nuxthub/composables/config.ts @@ -0,0 +1,3 @@ +export function useConfig() { + return useState('hub_config') +} diff --git a/_nuxthub/plugins/config.server.ts b/_nuxthub/plugins/config.server.ts new file mode 100644 index 00000000..bfe67af3 --- /dev/null +++ b/_nuxthub/plugins/config.server.ts @@ -0,0 +1,5 @@ +export default defineNuxtPlugin((nuxtApp) => { + const event = useRequestEvent() + + useState('hub_config', () => event?.context.config?.public || {}) +})