new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Nuxt · API · all subjects

composables/runtime-config

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useRuntimeConfig composable signature

The useRuntimeConfig function is used to access the resolved Nuxt runtime config at build-time. It takes no parameters and returns a Record<string, unknown>.

updateRuntimeConfig composable signature

The updateRuntimeConfig function is used to update runtime configuration at build-time. It takes a single parameter config of type Record<string, unknown> and returns void or Promise<void>. The config is merged with the existing runtime configuration, and if Nitro has already been initialized it will trigger an HMR event to reload the Nitro runtime config.

updateAppConfig signature

updateAppConfig is a function that takes an appConfig parameter of type Record<string, unknown> and returns void. It updates the app configuration that will be applied to nuxt.options.appConfig. The update is merged with existing configuration using defu.

updateAppConfig example usage in module

This example shows updateAppConfig imported from @nuxt/kit and used in a defineNuxtModule setup function to set default module values: import { defineNuxtModule, updateAppConfig } from '@nuxt/kit'; export default defineNuxtModule({ setup () { updateAppConfig({ myModule: { option: 'value', } }) } })

Give your agent this brain