Make your Nuxt experience count in The State of JavaScript 2024

updateAppConfig

Update the App Config at runtime.
Updates the app.config using deep assignment. Existing (nested) properties will be preserved.

Usage

const appConfig = useAppConfig() // { foo: 'bar' }

const newAppConfig = { foo: 'baz' }

updateAppConfig(newAppConfig)

console.log(appConfig) // { foo: 'baz' }
Read more in Docs > Guide > Directory Structure > App Config.