Nuxt 2 is reaching End-of-Life on June 30th, 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.