App Config
Nuxt Kit provides a set of utilities to help you access and modify Nuxt app configuration.
updateAppConfig
Update the app configuration that will be applied to nuxt.options.appConfig. This is useful for modules to set default values that can be overridden by user configuration. The update is merged with the existing configuration using defu.
Type
function updateAppConfig (appConfig: Record<string, unknown>): void
Example
import { defineNuxtModule, updateAppConfig } from '@nuxt/kit'
export default defineNuxtModule({
setup () {
updateAppConfig({
myModule: {
option: 'value',
},
})
},
})
Templates
Nuxt Kit provides a set of utilities to help you work with templates. These functions allow you to generate extra files during development and build time.
Nitro
Nuxt Kit provides a set of utilities to help you work with Nitro. These functions allow you to add server handlers, plugins, and prerender routes.